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

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

Introduction

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

The text is from its open source code.

Subclass

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

Field

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

Method

voidaddTab(ActionBar.Tab tab)
Add a tab for use in tabbed navigation mode.
ViewgetCustomView()
intgetDisplayOptions()
intgetNavigationMode()
Returns the current navigation mode.
ActionBar.TabgetSelectedTab()
Returns the currently selected tab if in tabbed navigation mode and there is at least one tab present.
ActionBar.TabgetTabAt(int index)
Returns the tab at the specified index.
voidhide()
Hide the ActionBar if it is not currently showing.
ActionBar.TabnewTab()
Create and return a new ActionBar.Tab.
voidselectTab(ActionBar.Tab tab)

Select the specified tab.

voidsetBackgroundDrawable(Drawable d)
Set the ActionBar's background.
voidsetCustomView(int resId)

Set the action bar into custom navigation mode, supplying a view for custom navigation.

Custom navigation views appear between the application icon and any action buttons and may use any space available there.

voidsetCustomView(View view)
Set the action bar into custom navigation mode, supplying a view for custom navigation.
voidsetDisplayHomeAsUpEnabled(boolean showHomeAsUp)

Set whether home should be displayed as an "up" affordance.

voidsetDisplayOptions(int options)
Set display options.
voidsetDisplayShowCustomEnabled(boolean showCustom)

Set whether a custom view should be displayed, if set.

To set several display options at once, see the setDisplayOptions methods.

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.

To set several display options at once, see the setDisplayOptions methods.

voidsetDisplayUseLogoEnabled(boolean useLogo)

Set whether to display the activity logo rather than the activity icon.

voidsetListNavigationCallbacks(SpinnerAdapter adapter, ActionBar.OnNavigationListener callback)
Set the adapter and navigation callback for list navigation mode.
voidsetNavigationMode(int mode)
Set the current navigation mode.
voidsetTitle(CharSequence title)
Set the action bar's title.
voidsetTitle(int resId)
Set the action bar's title.
voidshow()
Show the ActionBar if it is not currently showing.