Java android.app ActionBar fields, constructors, methods, implement or subclass

Example usage for Java android.app ActionBar fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.app ActionBar.

The text is from its open source code.

Subclass

android.app.ActionBar has subclasses.
Click this link to see all its subclasses.

Field

intNAVIGATION_MODE_STANDARD
Standard navigation mode.
intNAVIGATION_MODE_LIST
List navigation mode.
intNAVIGATION_MODE_TABS
Tab navigation mode.
intDISPLAY_USE_LOGO
Use logo instead of icon if available.
intDISPLAY_SHOW_HOME
Show 'home' elements in this action bar, leaving more space for other navigation elements.
intDISPLAY_HOME_AS_UP
Display the 'home' element such that it appears as an 'up' affordance.
intDISPLAY_SHOW_TITLE
Show the activity title and subtitle, if present.
intDISPLAY_SHOW_CUSTOM
Show the custom view if one has been set.

Method

voidaddOnMenuVisibilityListener(OnMenuVisibilityListener listener)
Add a listener that will respond to menu visibility change events.
voidaddTab(Tab tab)
Add a tab for use in tabbed navigation mode.
voidaddTab(Tab tab, boolean setSelected)
Add a tab for use in tabbed navigation mode.
voidaddTab(Tab tab, int position)
Add a tab for use in tabbed navigation mode.
booleancollapseActionView()
voiddispatchMenuVisibilityChanged(boolean visible)
ClassgetClass()
Returns the runtime class of this Object .
ViewgetCustomView()
intgetDisplayOptions()
intgetHeight()
Retrieve the current height of the ActionBar.
intgetNavigationMode()
Returns the current navigation mode.
intgetSelectedNavigationIndex()
Get the position of the selected navigation item in list or tabbed navigation modes.
TabgetSelectedTab()
Returns the currently selected tab if in tabbed navigation mode and there is at least one tab present.
CharSequencegetSubtitle()
Returns the current ActionBar subtitle in standard mode.
TabgetTabAt(int index)
Returns the tab at the specified index.
intgetTabCount()
Returns the number of tabs currently registered with the action bar.
ContextgetThemedContext()
Returns a Context with an appropriate theme for creating views that will appear in the action bar.
CharSequencegetTitle()
Returns the current ActionBar title in standard mode.
voidhide()
Hide the ActionBar if it is currently showing.
booleaninvalidateOptionsMenu()
booleanisShowing()
TabnewTab()
Create and return a new Tab .
voidonConfigurationChanged(Configuration config)
voidonDestroy()
booleanonKeyShortcut(int keyCode, KeyEvent event)
voidremoveAllTabs()
Remove all tabs from the action bar and deselect the current tab.
voidremoveTabAt(int position)
Remove a tab from the action bar.
voidselectTab(Tab tab)
Select the specified tab.
voidsetBackgroundDrawable(@Nullable Drawable d)
Set the ActionBar's background.
voidsetCustomView(View view, LayoutParams layoutParams)
Set the action bar into custom navigation mode, supplying a view for custom navigation.
voidsetCustomView(View view)
Set the action bar into custom navigation mode, supplying a view for custom navigation.
voidsetCustomView(@LayoutRes int resId)
Set the action bar into custom navigation mode, supplying a view for custom navigation.
voidsetDefaultDisplayHomeAsUpEnabled(boolean enabled)
voidsetDisplayHomeAsUpEnabled(boolean showHomeAsUp)
Set whether home should be displayed as an "up" affordance.
voidsetDisplayOptions(@DisplayOptions int options)
Set display options.
voidsetDisplayOptions(@DisplayOptions int options, @DisplayOptions int mask)
Set selected display options.
voidsetDisplayShowCustomEnabled(boolean showCustom)
Set whether a custom view should be displayed, if set.
voidsetDisplayShowHomeEnabled(boolean showHome)
Set whether to include the application home affordance in the action bar.
voidsetDisplayShowTitleEnabled(boolean showTitle)
Set whether an activity title/subtitle should be displayed.
voidsetDisplayUseLogoEnabled(boolean useLogo)
Set whether to display the activity logo rather than the activity icon.
voidsetElevation(float elevation)
Set the Z-axis elevation of the action bar in pixels.
voidsetHomeAsUpIndicator(Drawable indicator)
Set an alternate drawable to display next to the icon/logo/title when #DISPLAY_HOME_AS_UP is enabled.
voidsetHomeAsUpIndicator(@DrawableRes int resId)
Set an alternate drawable to display next to the icon/logo/title when #DISPLAY_HOME_AS_UP is enabled.
voidsetHomeButtonEnabled(boolean enabled)
Enable or disable the "home" button in the corner of the action bar.
voidsetIcon(@DrawableRes int resId)
Set the icon to display in the 'home' section of the action bar.
voidsetIcon(Drawable icon)
Set the icon to display in the 'home' section of the action bar.
voidsetListNavigationCallbacks(SpinnerAdapter adapter, OnNavigationListener callback)
Set the adapter and navigation callback for list navigation mode.
voidsetLogo(@DrawableRes int resId)
Set the logo to display in the 'home' section of the action bar.
voidsetLogo(Drawable logo)
Set the logo to display in the 'home' section of the action bar.
voidsetNavigationMode(@NavigationMode int mode)
Set the current navigation mode.
voidsetSelectedNavigationItem(int position)
Set the selected navigation item in list or tabbed navigation modes.
voidsetShowHideAnimationEnabled(boolean enabled)
voidsetSplitBackgroundDrawable(Drawable d)
Set the ActionBar's split background.
voidsetStackedBackgroundDrawable(Drawable d)
Set the ActionBar's stacked background.
voidsetSubtitle(CharSequence subtitle)
Set the action bar's subtitle.
voidsetSubtitle(@StringRes int resId)
Set the action bar's subtitle.
voidsetTitle(CharSequence title)
Set the action bar's title.
voidsetTitle(@StringRes int resId)
Set the action bar's title.
voidshow()
Show the ActionBar if it is not currently showing.
ActionModestartActionMode(ActionMode.Callback callback)