public abstract class PreferenceActivity extends AppCompatActivity implements NavigationFragment.Callback, NavigationPreferenceAdapter.Callback
NavigationPreference. On devices with small screens, e.g. on smartphones, the navigation is
designed to use the whole available space and selecting an item causes the corresponding
preferences to be shown full screen as well. On devices with large screens, e.g. on tablets, the
navigation and the preferences of the currently selected item are shown using a split screen
layout. However, the full screen layout can optionally be used on tablets as well.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EXTRA_BACK_BUTTON_TEXT
When starting this activity and using
EXTRA_SHOW_BUTTON_BAR, this extra can also
be specified to supply a custom text for the back button. |
static java.lang.String |
EXTRA_FINISH_BUTTON_TEXT
When starting this activity and using
EXTRA_SHOW_BUTTON_BAR, this extra can also
be specified to supply a custom text for the back button when the last navigation preference
is selected. |
static java.lang.String |
EXTRA_HIDE_NAVIGATION
When starting this activity, the invoking intent can contain this extra boolean to specify
that the navigation should not be displayed.
|
static java.lang.String |
EXTRA_NEXT_BUTTON_TEXT
When starting this activity and using
EXTRA_SHOW_BUTTON_BAR, this extra can also
be specified to supply a custom text for the next button. |
static java.lang.String |
EXTRA_NO_BREAD_CRUMBS
When starting this activity, the invoking intent can contain this extra boolean that the
toolbar, which is used to show the title of the currently selected navigation preference,
should not be displayed.
|
static java.lang.String |
EXTRA_PROGRESS_FORMAT
When starting this activity using
EXTRA_SHOW_BUTTON_BAR and
EXTRA_SHOW_PROGRESS, this string extra can also be specified to supply a custom
format for showing the progress. |
static java.lang.String |
EXTRA_SHOW_BUTTON_BAR
When starting this activity, the invoking intent can contain this extra boolean to display
back and next buttons in order to use the activity as a wizard.
|
static java.lang.String |
EXTRA_SHOW_FRAGMENT
When starting this activity, the invoking intent can contain this extra string to specify
which fragment should be initially displayed.
|
static java.lang.String |
EXTRA_SHOW_FRAGMENT_ARGUMENTS
When starting this activity and using
EXTRA_SHOW_FRAGMENT, this extra can also
be specified to supply a bundle of arguments to pass to that fragment when it is instantiated
during the initial creation of the activity. |
static java.lang.String |
EXTRA_SHOW_FRAGMENT_TITLE
When starting this activity and using
EXTRA_SHOW_FRAGMENT, this extra can also
be specified to supply the title to be shown for that fragment. |
static java.lang.String |
EXTRA_SHOW_PROGRESS
When starting this activity using
EXTRA_SHOW_BUTTON_BAR, this boolean extra can
also used to specify, whether the number of the currently shown wizard step and the number of
total steps should be shown as the bread crumb title. |
| Constructor and Description |
|---|
PreferenceActivity() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNavigationListener(NavigationListener listener)
Adds a new listener, which should be notified, when a navigation preference has been added or
removed to/from the activity.
|
void |
addPreferenceFragmentListener(PreferenceFragmentListener listener)
Adds a new listener, which should be notified, when the currently shown preference fragment
has been changed, to the activity.
|
void |
addWizardListener(WizardListener listener)
Adds a new listener, which should be notified, when the user navigates within the activity,
if it is used as a wizard.
|
java.util.List<NavigationPreference> |
getAllNavigationPreferences()
Returns a list, which contains all navigation preferences, which are contained by the
activity.
|
android.widget.Button |
getBackButton()
Returns the back button, which is shown when the activity is used as a wizard and the first
navigation preference is not selected.
|
java.lang.CharSequence |
getBackButtonText()
Returns the text of the back button, which is shown, when the activity is used as a wizard.
|
int |
getBreadCrumbBackgroundColor()
Returns the background color of the toolbar, which is used to show the bread crumb of the
currently selected navigation preference, when using the split screen layout.
|
int |
getBreadCrumbElevation()
Returns the elevation of the toolbar, which is used to show the bread crumb of the currently
selected navigation preference, when using the split screen layout.
|
Toolbar |
getBreadCrumbToolbar()
Returns the toolbar, which is used to show the bread crumb of the currently selected
navigation preference, when using the split screen layout.
|
android.view.ViewGroup |
getButtonBar()
Returns the button bar, which is shown when the activity is used as a wizard.
|
android.graphics.drawable.Drawable |
getButtonBarBackground()
Returns the background of the button bar, which is shown, when the activity is used as a
wizard.
|
int |
getButtonBarElevation()
Returns the elevation of the button bar, which is shown when using the activity as a wizard.
|
CardView |
getCardView()
Returns the card view, which contains the currently shown preference fragment, when using the
split screen layout.
|
int |
getCardViewBackgroundColor()
Returns the background color of the card view, which contains the currently shown preference
fragment, when using the split screen layout.
|
int |
getCardViewElevation()
Returns the elevation of the card view, which contains the currently shown preference
fragment, when using the split screen layout.
|
android.widget.Button |
getFinishButton()
Returns the finish button, which is shown when the activity is used as a wizard and the last
navigation preference is selected.
|
java.lang.CharSequence |
getFinishButtonText()
Returns the text of the finish button, which is shown, when the activity is used as a wizard
and the last navigation preference is currently selected.
|
android.widget.FrameLayout |
getFrameLayout()
Returns the frame layout, which contains the activity's views.
|
android.graphics.drawable.Drawable |
getNavigationBackground()
Returns the background of the navigation.
|
int |
getNavigationDividerColor()
Returns the color of the dividers, which are contained by the navigation.
|
PreferenceFragmentCompat |
getNavigationFragment()
Returns the preference fragment, which contains the activity's navigation.
|
int |
getNavigationPreferenceCount()
Returns the number of navigation preferences, which are contained by the activity.
|
int |
getNavigationSelectionColor()
Returns the background color of the currently selected navigation preference.
|
Toolbar |
getNavigationToolbar()
Returns the toolbar, which is used to show the activity's title, when using the split screen
layout.
|
int |
getNavigationWidth()
Returns the width of the navigation, when using the split screen layout.
|
android.widget.Button |
getNextButton()
Returns the next button, which is shown when the activity is used as a wizard and the last
navigation preference is not selected.
|
java.lang.CharSequence |
getNextButtonText()
Returns the text of the next button, which is shown, when the activity is used as a wizard.
|
Fragment |
getPreferenceFragment()
Returns the currently shown preference fragment.
|
java.lang.String |
getProgressFormat()
Returns the string, which is used to format the progress, which is shown, when the activity
is used as a wizard.
|
NavigationPreference |
getSelectedNavigationPreference()
Returns the currently selected navigation preference.
|
int |
getToolbarElevation()
Returns the elevation of the activity's toolbar.
|
void |
hideBreadCrumb(boolean hide)
Sets, whether the toolbar, which is used to show the bread crumb of the currently selected
navigation preference, should be hidden, or not.
|
void |
hideNavigation(boolean hideNavigation)
Hides or shows the navigation.
|
boolean |
isBreadCrumbHidden()
Returns, whether the toolbar, which is used to show the bread crumb of the currently selected
navigation preference, is hidden, or not.
|
boolean |
isButtonBarShown()
Returns, whether the activity is used as a wizard, or not.
|
boolean |
isNavigationHidden()
Returns, whether the navigation is currently hidden, or not.
|
boolean |
isNavigationIconOverridden()
Returns, whether the behavior of the navigation icon of the activity's toolbar is overridden
in order to return to the navigation when a preference fragment is currently shown and the
split screen layout is used.
|
boolean |
isNavigationPreferenceSelected()
Returns, whether a navigation preference is currently selected, or not.
|
boolean |
isPreferenceFragmentShown()
Returns, whether a preference fragment is currently shown, or not.
|
boolean |
isProgressShown()
Returns, whether the progress is shown, if the activity is used as a wizard.
|
boolean |
isSplitScreen()
Returns, whether the split screen layout is used, or not.
|
void |
onBackPressed() |
protected void |
onCreate(android.os.Bundle savedInstanceState) |
protected void |
onCreateNavigation(PreferenceFragmentCompat fragment)
The method, which is invoked on implementing subclasses, when the navigation is created.
|
void |
onNavigationAdapterCreated()
The method, which is invoked, when the adapter, which contains the navigation items, has
been created.
|
void |
onNavigationFragmentCreated(PreferenceFragmentCompat fragment)
The method, which is invoked, when the navigation fragment has been attached to its
activity.
|
void |
onNavigationPreferenceAdded(NavigationPreference navigationPreference)
The method, which is invoked, when a navigation preference has been added.
|
void |
onNavigationPreferenceRemoved(NavigationPreference navigationPreference)
The method, which is invoked, when a navigation preference has been removed.
|
void |
onNavigationPreferenceSelected(NavigationPreference navigationPreference,
android.os.Bundle arguments)
The method, which is invoked, when a navigation preference has been selected.
|
void |
onNavigationPreferenceUnselected()
The method, which is invoked, when a navigation preference has been unselected.
|
boolean |
onOptionsItemSelected(android.view.MenuItem item) |
protected void |
onRestoreInstanceState(android.os.Bundle savedInstanceState) |
protected void |
onSaveInstanceState(android.os.Bundle outState) |
boolean |
onSelectNavigationPreference(NavigationPreference navigationPreference)
The method, which is invoked, when a navigation preference is about to be selected.
|
void |
overrideNavigationIcon(boolean overrideNavigationIcon)
Sets, whether the behavior of the navigation icon of the activity's toolbar should be
overridden in order to return to the navigation when a preference screen is currently shown
and the split screen layout is used, or not.
|
void |
removeNavigationListener(NavigationListener listener)
Removes a specific listener, which should not be notified, when a navigation preference has
been added or removed to/from the activity, anymore.
|
void |
removePreferenceFragmentListener(PreferenceFragmentListener listener)
Removes a specific listener, which should not be notified, when the currently shown
preference fragment has been changed, anymore.
|
void |
removeWizardListener(WizardListener listener)
Removes a specific listener, which should not be notified, when the user navigates within the
activity, if it is used as a wizard.
|
void |
selectNavigationPreference(NavigationPreference navigationPreference)
Selects a specific navigation preference.
|
void |
selectNavigationPreference(NavigationPreference navigationPreference,
android.os.Bundle arguments)
Selects a specific navigation preference.
|
void |
setBackButtonText(java.lang.CharSequence text)
Sets the text of the back button, which is shown, when the activity is used as a wizard.
|
void |
setBackButtonText(int resourceId)
Sets the text of the back button, which is shown, when the activity is used as a wizard.
|
void |
setBreadCrumbBackgroundColor(int color)
Sets the background color of the toolbar, which is used to show the bread crumb of the
currently selected navigation preference, when using the split screen layout.
|
void |
setBreadCrumbElevation(int elevation)
Sets the elevation of the toolbar, which is used to show the bread crumb of the currently
selected navigation preference, when using the split screen layout.
|
void |
setButtonBarBackground(android.graphics.drawable.Drawable background)
Sets the background of the button bar, which is shown, when the activity is used as a
wizard.
|
void |
setButtonBarBackground(int resourceId)
Sets the background of the button bar, which is shown, when the activity is used as a
wizard.
|
void |
setButtonBarBackgroundColor(int color)
Sets the background of the button bar, which is shown, when the activity is used as a
wizard.
|
void |
setButtonBarElevation(int elevation)
Sets the elevation of the button bar, which is shown when using the activity as a wizard.
|
void |
setCardViewBackgroundColor(int color)
Sets the background color of the card view, which contains the currently shown preference
fragment, when using the split screen layout.
|
void |
setCardViewElevation(int elevation)
Sets the elevation of the card view, which contains the currently shown prefernce fragment,
when using the split screen layout.
|
void |
setFinishButtonText(java.lang.CharSequence text)
Sets the text of the next button, which is shown, when the activity is used as a wizard and
the last navigation preference is currently selected.
|
void |
setFinishButtonText(int resourceId)
Sets the text of the next button, which is shown, when the activity is used as a wizard and
the last navigation preference is currently selected.
|
void |
setNavigationBackground(android.graphics.drawable.Drawable background)
Sets the background of the navigation.
|
void |
setNavigationBackground(int resourceId)
Sets the background of the navigation.
|
void |
setNavigationBackgroundColor(int color)
Sets the background color of the navigation.
|
void |
setNavigationDividerColor(int color)
Sets the color of the dividers, which are contained by the navigation.
|
void |
setNavigationSelectionColor(int color)
Sets the background color of the currently selected navigation preference.
|
void |
setNavigationWidth(int width)
Sets the width of the navigation, when using the split screen layout.
|
void |
setNextButtonText(java.lang.CharSequence text)
Sets the text of the next button, which is shown, when the activity is used as a wizard.
|
void |
setNextButtonText(int resourceId)
Sets the text of the next button, which is shown, when the activity is used as a wizard.
|
void |
setProgressFormat(int resourceId)
Sets the string, which should be used to format the progress, which is shown, when the
activity is used as a wizard.
|
void |
setProgressFormat(java.lang.String progressFormat)
Sets the string, which should be used to format the progress, which is shown, when the
activity is used as a wizard.
|
void |
setTitle(java.lang.CharSequence title) |
void |
setTitle(int resourceId) |
void |
setToolbarElevation(int elevation)
Sets the elevation of the activity's toolbar.
|
void |
showButtonBar(boolean show)
Shows or hides the view group, which contains the buttons, which are shown when the activity
is used as a wizard.
|
void |
showProgress(boolean showProgress)
Sets, whether the progress should be shown, when the activity is used as a wizard.
|
void |
unselectNavigationPreference()
Unselects the currently selected navigation preference and hides the associated fragment, if
the split screen layout is not used and the navigation is not hidden.
|
void |
useSplitScreen(boolean useSplitScreen)
Sets, whether the split screen layout should be used on tablets, or not.
|
public static final java.lang.String EXTRA_SHOW_FRAGMENT
public static final java.lang.String EXTRA_SHOW_FRAGMENT_ARGUMENTS
EXTRA_SHOW_FRAGMENT, this extra can also
be specified to supply a bundle of arguments to pass to that fragment when it is instantiated
during the initial creation of the activity.public static final java.lang.String EXTRA_SHOW_FRAGMENT_TITLE
EXTRA_SHOW_FRAGMENT, this extra can also
be specified to supply the title to be shown for that fragment.public static final java.lang.String EXTRA_HIDE_NAVIGATION
EXTRA_SHOW_FRAGMENT to launch the activity to display a specific fragment that
the user has navigated to.public static final java.lang.String EXTRA_SHOW_BUTTON_BAR
public static final java.lang.String EXTRA_NEXT_BUTTON_TEXT
EXTRA_SHOW_BUTTON_BAR, this extra can also
be specified to supply a custom text for the next button.public static final java.lang.String EXTRA_BACK_BUTTON_TEXT
EXTRA_SHOW_BUTTON_BAR, this extra can also
be specified to supply a custom text for the back button.public static final java.lang.String EXTRA_FINISH_BUTTON_TEXT
EXTRA_SHOW_BUTTON_BAR, this extra can also
be specified to supply a custom text for the back button when the last navigation preference
is selected.public static final java.lang.String EXTRA_SHOW_PROGRESS
EXTRA_SHOW_BUTTON_BAR, this boolean extra can
also used to specify, whether the number of the currently shown wizard step and the number of
total steps should be shown as the bread crumb title.public static final java.lang.String EXTRA_NO_BREAD_CRUMBS
public static final java.lang.String EXTRA_PROGRESS_FORMAT
EXTRA_SHOW_BUTTON_BAR and
EXTRA_SHOW_PROGRESS, this string extra can also be specified to supply a custom
format for showing the progress. The string must be formatted according to the following
syntax: "*%d*%d*%s*"public final void addPreferenceFragmentListener(PreferenceFragmentListener listener)
listener - The listener, which should be added, as an instance of the type PreferenceFragmentListener. The listener may not be nullpublic final void removePreferenceFragmentListener(PreferenceFragmentListener listener)
listener - The listener, which should be removed, as an instance of the type PreferenceFragmentListener. The listener may not be nullpublic final void addWizardListener(WizardListener listener)
listener - The listener, which should be added, as an instance of the type WizardListener. The listener may not be nullpublic final void removeWizardListener(WizardListener listener)
listener - The listener, which should be removed, as an instance of the type WizardListener. The listener may not be nullpublic final void addNavigationListener(NavigationListener listener)
listener - The listener, which should be added, as an instance of the type NavigationListener. The listener may not be nullpublic final void removeNavigationListener(NavigationListener listener)
listener - The listener, which should be removed, as an instance of the type NavigationListener. The listener may not be nullpublic final boolean isSplitScreen()
public final PreferenceFragmentCompat getNavigationFragment()
public final Fragment getPreferenceFragment()
public final android.widget.FrameLayout getFrameLayout()
FrameLayout or null, if the activity has not been created yetpublic final CardView getCardView()
public final Toolbar getNavigationToolbar()
public final Toolbar getBreadCrumbToolbar()
public final android.view.ViewGroup getButtonBar()
ViewGroup or null, if the activity
has not been created yetpublic final android.widget.Button getNextButton()
Button or null, if the activity
has not been created yetpublic final android.widget.Button getBackButton()
Button or null, if the activity
has not been created yetpublic final android.widget.Button getFinishButton()
Button or null, if the activity
has not been created yetpublic final void useSplitScreen(boolean useSplitScreen)
useSplitScreen - True, if the split screen layout should be used on tablets, false otherwisepublic final int getNavigationWidth()
Integer valuepublic final void setNavigationWidth(int width)
width - The width, which should be set, in pixels as an Integer value. The width must
be greater than 0public final boolean isNavigationHidden()
public final void hideNavigation(boolean hideNavigation)
hideNavigation - True, if the navigation should be hidden, false otherwisepublic final boolean isNavigationIconOverridden()
public final void overrideNavigationIcon(boolean overrideNavigationIcon)
overrideNavigationIcon - True, if the behavior of the navigation icon should be overridden, false otherwisepublic final boolean isButtonBarShown()
public final void showButtonBar(boolean show)
show - True, if the button bar should be shown, false otherwisepublic final java.lang.CharSequence getNextButtonText()
CharSequence. The
text may neither be null, nor emptypublic final void setNextButtonText(int resourceId)
resourceId - The resource id of the text, which should be set, as an Integer value. The
resource id must correspond to a valid string resourcepublic final void setNextButtonText(java.lang.CharSequence text)
text - The text, which should be set, as an instance of the class CharSequence. The
text may neither be null, nor emptypublic final java.lang.CharSequence getBackButtonText()
CharSequence. The
text may neither null, nor emptypublic final void setBackButtonText(int resourceId)
resourceId - The resource id of the text, which should be set, as an Integer value. The
resource id must correspond to a valid string resourcepublic final void setBackButtonText(java.lang.CharSequence text)
text - The text, which should be set, as an instance of the class CharSequence. The
text may neither null, nor emptypublic final java.lang.CharSequence getFinishButtonText()
CharSequence. The
text may neither be null, nor emptypublic final void setFinishButtonText(int resourceId)
resourceId - The resource id of the text, which should be set, as an Integer value. The
resource id must correspond to a valid string resourcepublic final void setFinishButtonText(java.lang.CharSequence text)
text - The text, which should be set, as an instance of the class CharSequence. The
text may neither be null, nor emptypublic final boolean isProgressShown()
public final void showProgress(boolean showProgress)
showProgress - True, if the progress should be shown, when the activity is used as a wizard, false
otherwisepublic final java.lang.String getProgressFormat()
String. The string may
neither be null, nor emptypublic final void setProgressFormat(int resourceId)
resourceId - The resource id of the string, which should be set, as an Integer value. The
resource id must correspond to a valid string resource. It must be formatted
according to the following syntax: "*%d*%d*%s*"public final void setProgressFormat(java.lang.String progressFormat)
progressFormat - The string, which should be set, as a String. The string may neither be null,
nor empty. It must be formatted according to the following syntax: "*%d*%d*%s*"public final boolean isBreadCrumbHidden()
public final void hideBreadCrumb(boolean hide)
hide - True, if the toolbar, which is used to show the bread crumb of the currently selected
navigation preference, should be hidden, false otherwisepublic final int getToolbarElevation()
Integer valuepublic final void setToolbarElevation(int elevation)
elevation - The elevation, which should be set, in dp as an Integer value. The elevation
must be at least 0 and at maximum 16public final int getBreadCrumbElevation()
Integer valuepublic final void setBreadCrumbElevation(int elevation)
elevation - The elevation, which should be set, in dp as an Integer value. The elevation
must be at least 0 and at maximum 16public final int getCardViewElevation()
Integer valuepublic final void setCardViewElevation(int elevation)
elevation - The elevation, which should be set, in dp as an Integer value. The elevation
must be at least 0 and at maximum 16public final int getButtonBarElevation()
Integer valuepublic final void setButtonBarElevation(int elevation)
elevation - The elevation, which should be set, in dp as an Integer value. The elevation
must be at least 0 and at maximum 16public final int getCardViewBackgroundColor()
Integer valuepublic final void setCardViewBackgroundColor(int color)
color - The background color, which should be set, as an Integer valuepublic final int getBreadCrumbBackgroundColor()
Integer valuepublic final void setBreadCrumbBackgroundColor(int color)
color - The background color, which should be set, as an Integer valuepublic final android.graphics.drawable.Drawable getButtonBarBackground()
Drawable or null, if no background is setpublic final void setButtonBarBackgroundColor(int color)
color - The background color, which should be set, as an Integer valuepublic final void setButtonBarBackground(int resourceId)
resourceId - The resource id of the background, which should be set, as an Integer value.
The resource id must correspond to a valid drawable resourcepublic final void setButtonBarBackground(android.graphics.drawable.Drawable background)
background - The background, which should be set, as an instance of the class Drawable or
null, if no background should be setpublic final android.graphics.drawable.Drawable getNavigationBackground()
Drawable or
null, if no background is setpublic final void setNavigationBackgroundColor(int color)
color - The background color, which should be set, as an Integer valuepublic final void setNavigationBackground(int resourceId)
resourceId - The resource id of the background, which should be set, as an Integer value.
The resource id must correspond to a valid drawable resourcepublic final void setNavigationBackground(android.graphics.drawable.Drawable background)
background - The background, which should be set, as an instance of the class Drawable or
null, if no background should be setpublic final int getNavigationSelectionColor()
Integerpublic final void setNavigationSelectionColor(int color)
color - The color, which should be set, as an Integer valuepublic final int getNavigationDividerColor()
Integer valuepublic final void setNavigationDividerColor(int color)
color - The color, which should be set, as an Integer valuepublic final boolean isPreferenceFragmentShown()
public final int getNavigationPreferenceCount()
Integer valuepublic final java.util.List<NavigationPreference> getAllNavigationPreferences()
List or an empty collection, if no navigation
preferences are contained by the activitypublic final boolean isNavigationPreferenceSelected()
public final NavigationPreference getSelectedNavigationPreference()
NavigationPreference or null, if no navigation preference is currently selectedpublic final void selectNavigationPreference(NavigationPreference navigationPreference)
navigationPreference - The navigation preference, which should be selected, as an instance of the class
NavigationPreference. The navigation preference may not be nullpublic final void selectNavigationPreference(NavigationPreference navigationPreference, android.os.Bundle arguments)
navigationPreference - The navigation preference, which should be selected, as an instance of the class
NavigationPreference. The navigation preference may not be nullarguments - The arguments, which should be passed to the fragment, which is associated with the
navigation preference, as an instance of the class Bundle or null, if no
arguments should be passed to the fragmentpublic final void unselectNavigationPreference()
protected void onCreateNavigation(PreferenceFragmentCompat fragment)
fragment - The preference fragment, which contains the navigation's preferences, as an instance
of the class PreferenceFragmentCompat. The preference fragment may not be nullpublic final void setTitle(int resourceId)
public final void setTitle(java.lang.CharSequence title)
public final void onNavigationFragmentCreated(PreferenceFragmentCompat fragment)
NavigationFragment.CallbackonNavigationFragmentCreated in interface NavigationFragment.Callbackfragment - The navigation fragment as an instance of the class PreferenceFragmentCompat. The
fragment may not be nullpublic final void onNavigationAdapterCreated()
NavigationFragment.CallbackonNavigationAdapterCreated in interface NavigationFragment.Callbackpublic final boolean onSelectNavigationPreference(NavigationPreference navigationPreference)
NavigationPreferenceAdapter.CallbackonSelectNavigationPreference in interface NavigationPreferenceAdapter.CallbacknavigationPreference - The navigation preference, which is about to be selected, as an instance of the
class NavigationPreference. The navigation preference may not be nullpublic final void onNavigationPreferenceSelected(NavigationPreference navigationPreference, android.os.Bundle arguments)
NavigationPreferenceAdapter.CallbackonNavigationPreferenceSelected in interface NavigationPreferenceAdapter.CallbacknavigationPreference - The navigation preference, which has been selected, as an instance of the class
NavigationPreference. The navigation preference may not be nullarguments - The arguments, which should be passed to the fragment, which is associated with
the navigation preference, as an instance of the class Bundle or null, if
no arguments should be passed to the fragmentpublic final void onNavigationPreferenceUnselected()
NavigationPreferenceAdapter.CallbackonNavigationPreferenceUnselected in interface NavigationPreferenceAdapter.Callbackpublic final void onNavigationPreferenceAdded(NavigationPreference navigationPreference)
NavigationPreferenceAdapter.CallbackonNavigationPreferenceAdded in interface NavigationPreferenceAdapter.CallbacknavigationPreference - The navigation preference, which has been added, as an instance of the class
NavigationPreference. The navigation preference may not be nullpublic final void onNavigationPreferenceRemoved(NavigationPreference navigationPreference)
NavigationPreferenceAdapter.CallbackonNavigationPreferenceRemoved in interface NavigationPreferenceAdapter.CallbacknavigationPreference - The navigation preference, which has been removed, as an instance of the class
NavigationPreference. The navigation preference may not be nullpublic void onBackPressed()
public boolean onOptionsItemSelected(android.view.MenuItem item)
protected void onCreate(android.os.Bundle savedInstanceState)
protected void onSaveInstanceState(android.os.Bundle outState)
protected void onRestoreInstanceState(android.os.Bundle savedInstanceState)