Example usage for Java android.app ActionBar fields, constructors, methods, implement or subclass
The text is from its open source code.
int | NAVIGATION_MODE_STANDARD Standard navigation mode. |
int | NAVIGATION_MODE_LIST List navigation mode. |
int | NAVIGATION_MODE_TABS Tab navigation mode. |
int | DISPLAY_USE_LOGO Use logo instead of icon if available. |
int | DISPLAY_SHOW_HOME Show 'home' elements in this action bar, leaving more space for other navigation elements. |
int | DISPLAY_HOME_AS_UP Display the 'home' element such that it appears as an 'up' affordance. |
int | DISPLAY_SHOW_TITLE Show the activity title and subtitle, if present. |
int | DISPLAY_SHOW_CUSTOM Show the custom view if one has been set. |
void | addOnMenuVisibilityListener(OnMenuVisibilityListener listener) Add a listener that will respond to menu visibility change events. |
void | addTab(Tab tab) Add a tab for use in tabbed navigation mode. |
void | addTab(Tab tab, boolean setSelected) Add a tab for use in tabbed navigation mode. |
void | addTab(Tab tab, int position) Add a tab for use in tabbed navigation mode. |
boolean | collapseActionView() |
void | dispatchMenuVisibilityChanged(boolean visible) |
Class> | getClass() Returns the runtime class of this Object . |
View | getCustomView() |
int | getDisplayOptions() |
int | getHeight() Retrieve the current height of the ActionBar. |
int | getNavigationMode() Returns the current navigation mode. |
int | getSelectedNavigationIndex() Get the position of the selected navigation item in list or tabbed navigation modes. |
Tab | getSelectedTab() Returns the currently selected tab if in tabbed navigation mode and there is at least one tab present. |
CharSequence | getSubtitle() Returns the current ActionBar subtitle in standard mode. |
Tab | getTabAt(int index) Returns the tab at the specified index. |
int | getTabCount() Returns the number of tabs currently registered with the action bar. |
Context | getThemedContext() Returns a Context with an appropriate theme for creating views that will appear in the action bar. |
CharSequence | getTitle() Returns the current ActionBar title in standard mode. |
void | hide() Hide the ActionBar if it is currently showing. |
boolean | invalidateOptionsMenu() |
boolean | isShowing() |
Tab | newTab() Create and return a new Tab . |
void | onConfigurationChanged(Configuration config) |
void | onDestroy() |
boolean | onKeyShortcut(int keyCode, KeyEvent event) |
void | removeAllTabs() Remove all tabs from the action bar and deselect the current tab. |
void | removeTabAt(int position) Remove a tab from the action bar. |
void | selectTab(Tab tab) Select the specified tab. |
void | setBackgroundDrawable(@Nullable Drawable d) Set the ActionBar's background. |
void | setCustomView(View view, LayoutParams layoutParams) Set the action bar into custom navigation mode, supplying a view for custom navigation. |
void | setCustomView(View view) Set the action bar into custom navigation mode, supplying a view for custom navigation. |
void | setCustomView(@LayoutRes int resId) Set the action bar into custom navigation mode, supplying a view for custom navigation. |
void | setDefaultDisplayHomeAsUpEnabled(boolean enabled) |
void | setDisplayHomeAsUpEnabled(boolean showHomeAsUp) Set whether home should be displayed as an "up" affordance. |
void | setDisplayOptions(@DisplayOptions int options) Set display options. |
void | setDisplayOptions(@DisplayOptions int options, @DisplayOptions int mask) Set selected display options. |
void | setDisplayShowCustomEnabled(boolean showCustom) Set whether a custom view should be displayed, if set. |
void | setDisplayShowHomeEnabled(boolean showHome) Set whether to include the application home affordance in the action bar. |
void | setDisplayShowTitleEnabled(boolean showTitle) Set whether an activity title/subtitle should be displayed. |
void | setDisplayUseLogoEnabled(boolean useLogo) Set whether to display the activity logo rather than the activity icon. |
void | setElevation(float elevation) Set the Z-axis elevation of the action bar in pixels. |
void | setHomeAsUpIndicator(Drawable indicator) Set an alternate drawable to display next to the icon/logo/title when #DISPLAY_HOME_AS_UP is enabled. |
void | setHomeAsUpIndicator(@DrawableRes int resId) Set an alternate drawable to display next to the icon/logo/title when #DISPLAY_HOME_AS_UP is enabled. |
void | setHomeButtonEnabled(boolean enabled) Enable or disable the "home" button in the corner of the action bar. |
void | setIcon(@DrawableRes int resId) Set the icon to display in the 'home' section of the action bar. |
void | setIcon(Drawable icon) Set the icon to display in the 'home' section of the action bar. |
void | setListNavigationCallbacks(SpinnerAdapter adapter, OnNavigationListener callback) Set the adapter and navigation callback for list navigation mode. |
void | setLogo(@DrawableRes int resId) Set the logo to display in the 'home' section of the action bar. |
void | setLogo(Drawable logo) Set the logo to display in the 'home' section of the action bar. |
void | setNavigationMode(@NavigationMode int mode) Set the current navigation mode. |
void | setSelectedNavigationItem(int position) Set the selected navigation item in list or tabbed navigation modes. |
void | setShowHideAnimationEnabled(boolean enabled) |
void | setSplitBackgroundDrawable(Drawable d) Set the ActionBar's split background. |
void | setStackedBackgroundDrawable(Drawable d) Set the ActionBar's stacked background. |
void | setSubtitle(CharSequence subtitle) Set the action bar's subtitle. |
void | setSubtitle(@StringRes int resId) Set the action bar's subtitle. |
void | setTitle(CharSequence title) Set the action bar's title. |
void | setTitle(@StringRes int resId) Set the action bar's title. |
void | show() Show the ActionBar if it is not currently showing. |
ActionMode | startActionMode(ActionMode.Callback callback) |