# ActionBar

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:appcompat-v7:28.0.0-alpha1  
Summary:[Nested Classes](https://developer.android.com/reference/android/support/v7/app/ActionBar#nestedclasses)\|[Constants](https://developer.android.com/reference/android/support/v7/app/ActionBar#constants)\|[Ctors](https://developer.android.com/reference/android/support/v7/app/ActionBar#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v7/app/ActionBar#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v7/app/ActionBar#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v7/app/ActionBar#)  

# ActionBar

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


abstract
class
ActionBar
`  
`

extends Object


``


`

|---|----------------------------------|
| java.lang.Object                    ||
| ↳ | android.support.v7.app.ActionBar |

<br />

*** ** * ** ***

A primary toolbar within the activity that may display the activity title, application-level navigation affordances, and other interactive items.

The action bar appears at the top of an activity's window when the activity uses the AppCompat's[AppCompat](https://developer.android.com/reference/android/support/v7/appcompat/R.style#Theme_AppCompat)theme (or one of its descendant themes). You may otherwise add the action bar by calling[requestFeature(FEATURE_SUPPORT_ACTION_BAR)](https://developer.android.com/reference/android/support/v7/app/AppCompatDelegate#requestWindowFeature(int))or by declaring it in a custom theme with the[windowActionBar](https://developer.android.com/reference/android/support/v7/appcompat/R.styleable#AppCompatTheme_windowActionBar)property.

The action bar may be represented by any Toolbar widget within the application layout. The application may signal to the Activity which Toolbar should be treated as the Activity's action bar. Activities that use this feature should use one of the supplied`.NoActionBar`themes, set the[windowActionBar](https://developer.android.com/reference/android/support/v7/appcompat/R.styleable#AppCompatTheme_windowActionBar)attribute to`false`or otherwise not request the window feature.

If your activity has an options menu, you can make select items accessible directly from the action bar as "action items". You can also modify various characteristics of the action bar or remove it completely.

The navigation button (formerly "Home") takes over the space previously occupied by the application icon. Apps wishing to express a stronger branding should use their brand colors heavily in the action bar and other application chrome or use a[logo](https://developer.android.com/reference/android/support/v7/app/ActionBar#setLogo(int))in place of their standard title text.

From your activity, you can retrieve an instance of[ActionBar](https://developer.android.com/reference/android/support/v7/app/ActionBar)by calling[getSupportActionBar()](https://developer.android.com/reference/android/support/v7/app/AppCompatActivity#getSupportActionBar())getSupportActionBar()}.

In some cases, the action bar may be overlayed by another bar that enables contextual actions, using an[ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode). For example, when the user selects one or more items in your activity, you can enable an action mode that offers actions specific to the selected items, with a UI that temporarily replaces the action bar. Although the UI may occupy the same space, the[ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode)APIs are distinct and independent from those for[ActionBar](https://developer.android.com/reference/android/support/v7/app/ActionBar).  

### Developer Guides

For information about how to use the action bar, including how to add action items, navigation modes and more, read the[Action Bar](https://developer.android.com/guide/topics/ui/actionbar)developer guide.

<br />

## Summary

|                                                                                                                                                                                                  ### Nested classes                                                                                                                                                                                                   ||
|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class`     | [ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams) Per-child layout information associated with action bar custom views.                                                                                                                                                                                                                   |
| ` interface` | [ActionBar.OnMenuVisibilityListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnMenuVisibilityListener) Listener for receiving events when action bar menus are shown or hidden.                                                                                                                                                                                        |
| ` interface` | [ActionBar.OnNavigationListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnNavigationListener) *This interface was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.* |
| ` class`     | [ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab) *This class was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                       |
| ` interface` | [ActionBar.TabListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.TabListener) *This interface was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                   |

|                                                                                                                                                                                                ### Constants                                                                                                                                                                                                ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [DISPLAY_HOME_AS_UP](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_HOME_AS_UP) Display the 'home' element such that it appears as an 'up' affordance.                                                                                                                                                                                                             |
| `int` | [DISPLAY_SHOW_CUSTOM](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_SHOW_CUSTOM) Show the custom view if one has been set.                                                                                                                                                                                                                                        |
| `int` | [DISPLAY_SHOW_HOME](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_SHOW_HOME) Show 'home' elements in this action bar, leaving more space for other navigation elements.                                                                                                                                                                                           |
| `int` | [DISPLAY_SHOW_TITLE](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_SHOW_TITLE) Show the activity title and subtitle, if present.                                                                                                                                                                                                                                  |
| `int` | [DISPLAY_USE_LOGO](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_USE_LOGO) Use logo instead of icon if available.                                                                                                                                                                                                                                                 |
| `int` | [NAVIGATION_MODE_LIST](https://developer.android.com/reference/android/support/v7/app/ActionBar#NAVIGATION_MODE_LIST) *This constant was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*         |
| `int` | [NAVIGATION_MODE_STANDARD](https://developer.android.com/reference/android/support/v7/app/ActionBar#NAVIGATION_MODE_STANDARD) *This constant was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.* |
| `int` | [NAVIGATION_MODE_TABS](https://developer.android.com/reference/android/support/v7/app/ActionBar#NAVIGATION_MODE_TABS) *This constant was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*         |

|                                           ### Public constructors                                            ||
|-----------------------------------------------------------------------------------------------------------|---|
| ` `[ActionBar](https://developer.android.com/reference/android/support/v7/app/ActionBar#ActionBar())`() ` |

|                                                                                                                                                                                                                                                                                                                                                                                                                        ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                                         ||
|-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void`                                                                                          | ` `[addOnMenuVisibilityListener](https://developer.android.com/reference/android/support/v7/app/ActionBar#addOnMenuVisibilityListener(android.support.v7.app.ActionBar.OnMenuVisibilityListener))`(`[ActionBar.OnMenuVisibilityListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnMenuVisibilityListener)` listener) ` Add a listener that will respond to menu visibility change events.                                                                                                                                                                                                                                                                                                                            |
| ` abstract void`                                                                                          | ` `[addTab](https://developer.android.com/reference/android/support/v7/app/ActionBar#addTab(android.support.v7.app.ActionBar.Tab, int))`(`[ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab)` tab, int position) ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                     |
| ` abstract void`                                                                                          | ` `[addTab](https://developer.android.com/reference/android/support/v7/app/ActionBar#addTab(android.support.v7.app.ActionBar.Tab))`(`[ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab)` tab) ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                        |
| ` abstract void`                                                                                          | ` `[addTab](https://developer.android.com/reference/android/support/v7/app/ActionBar#addTab(android.support.v7.app.ActionBar.Tab, int, boolean))`(`[ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab)` tab, int position, boolean setSelected) ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                       |
| ` abstract void`                                                                                          | ` `[addTab](https://developer.android.com/reference/android/support/v7/app/ActionBar#addTab(android.support.v7.app.ActionBar.Tab, boolean))`(`[ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab)` tab, boolean setSelected) ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                          |
| ` abstract `[View](https://developer.android.com/reference/android/view/View.html)                        | ` `[getCustomView](https://developer.android.com/reference/android/support/v7/app/ActionBar#getCustomView())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` abstract int`                                                                                           | ` `[getDisplayOptions](https://developer.android.com/reference/android/support/v7/app/ActionBar#getDisplayOptions())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` float`                                                                                                  | ` `[getElevation](https://developer.android.com/reference/android/support/v7/app/ActionBar#getElevation())`() ` Get the Z-axis elevation of the action bar in pixels.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` abstract int`                                                                                           | ` `[getHeight](https://developer.android.com/reference/android/support/v7/app/ActionBar#getHeight())`() ` Retrieve the current height of the ActionBar.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` int`                                                                                                    | ` `[getHideOffset](https://developer.android.com/reference/android/support/v7/app/ActionBar#getHideOffset())`() ` Return the current vertical offset of the action bar.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` abstract int`                                                                                           | ` `[getNavigationItemCount](https://developer.android.com/reference/android/support/v7/app/ActionBar#getNavigationItemCount())`() ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                                                                                                                               |
| ` abstract int`                                                                                           | ` `[getNavigationMode](https://developer.android.com/reference/android/support/v7/app/ActionBar#getNavigationMode())`() ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                                                                                                                                         |
| ` abstract int`                                                                                           | ` `[getSelectedNavigationIndex](https://developer.android.com/reference/android/support/v7/app/ActionBar#getSelectedNavigationIndex())`() ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                                                                                                                       |
| ` abstract `[ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab) | ` `[getSelectedTab](https://developer.android.com/reference/android/support/v7/app/ActionBar#getSelectedTab())`() ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                                                                                                                                               |
| ` abstract CharSequence`                                                                                  | ` `[getSubtitle](https://developer.android.com/reference/android/support/v7/app/ActionBar#getSubtitle())`() ` Returns the current ActionBar subtitle in standard mode.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` abstract `[ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab) | ` `[getTabAt](https://developer.android.com/reference/android/support/v7/app/ActionBar#getTabAt(int))`(int index) ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                                                                                                                                               |
| ` abstract int`                                                                                           | ` `[getTabCount](https://developer.android.com/reference/android/support/v7/app/ActionBar#getTabCount())`() ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                                                                                                                                                     |
| ` `[Context](https://developer.android.com/reference/android/content/Context.html)                        | ` `[getThemedContext](https://developer.android.com/reference/android/support/v7/app/ActionBar#getThemedContext())`() ` Returns a[Context](https://developer.android.com/reference/android/content/Context.html)with an appropriate theme for creating views that will appear in the action bar.                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` abstract CharSequence`                                                                                  | ` `[getTitle](https://developer.android.com/reference/android/support/v7/app/ActionBar#getTitle())`() ` Returns the current ActionBar title in standard mode.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` abstract void`                                                                                          | ` `[hide](https://developer.android.com/reference/android/support/v7/app/ActionBar#hide())`() ` Hide the ActionBar if it is currently showing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` boolean`                                                                                                | ` `[isHideOnContentScrollEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBar#isHideOnContentScrollEnabled())`() ` Return whether the action bar is configured to scroll out of sight along with a[nested scrolling child](https://developer.android.com/reference/android/view/View.html#setNestedScrollingEnabled(boolean)).                                                                                                                                                                                                                                                                                                                                                                                            |
| ` abstract boolean`                                                                                       | ` `[isShowing](https://developer.android.com/reference/android/support/v7/app/ActionBar#isShowing())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` abstract `[ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab) | ` `[newTab](https://developer.android.com/reference/android/support/v7/app/ActionBar#newTab())`() ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                                                                                                                                                               |
| ` abstract void`                                                                                          | ` `[removeAllTabs](https://developer.android.com/reference/android/support/v7/app/ActionBar#removeAllTabs())`() ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                                                                                                                                                 |
| ` abstract void`                                                                                          | ` `[removeOnMenuVisibilityListener](https://developer.android.com/reference/android/support/v7/app/ActionBar#removeOnMenuVisibilityListener(android.support.v7.app.ActionBar.OnMenuVisibilityListener))`(`[ActionBar.OnMenuVisibilityListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnMenuVisibilityListener)` listener) ` Remove a menu visibility listener.                                                                                                                                                                                                                                                                                                                                                      |
| ` abstract void`                                                                                          | ` `[removeTab](https://developer.android.com/reference/android/support/v7/app/ActionBar#removeTab(android.support.v7.app.ActionBar.Tab))`(`[ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab)` tab) ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                  |
| ` abstract void`                                                                                          | ` `[removeTabAt](https://developer.android.com/reference/android/support/v7/app/ActionBar#removeTabAt(int))`(int position) ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                                                                                                                                      |
| ` abstract void`                                                                                          | ` `[selectTab](https://developer.android.com/reference/android/support/v7/app/ActionBar#selectTab(android.support.v7.app.ActionBar.Tab))`(`[ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab)` tab) ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                  |
| ` abstract void`                                                                                          | ` `[setBackgroundDrawable](https://developer.android.com/reference/android/support/v7/app/ActionBar#setBackgroundDrawable(android.graphics.drawable.Drawable))`(`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` d) ` Set the ActionBar's background.                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` abstract void`                                                                                          | ` `[setCustomView](https://developer.android.com/reference/android/support/v7/app/ActionBar#setCustomView(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` view) ` Set the action bar into custom navigation mode, supplying a view for custom navigation.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` abstract void`                                                                                          | ` `[setCustomView](https://developer.android.com/reference/android/support/v7/app/ActionBar#setCustomView(int))`(int resId) ` Set the action bar into custom navigation mode, supplying a view for custom navigation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` abstract void`                                                                                          | ` `[setCustomView](https://developer.android.com/reference/android/support/v7/app/ActionBar#setCustomView(android.view.View, android.support.v7.app.ActionBar.LayoutParams))`(`[View](https://developer.android.com/reference/android/view/View.html)` view, `[ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams)` layoutParams) ` Set the action bar into custom navigation mode, supplying a view for custom navigation.                                                                                                                                                                                                                                                                 |
| ` abstract void`                                                                                          | ` `[setDisplayHomeAsUpEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayHomeAsUpEnabled(boolean))`(boolean showHomeAsUp) ` Set whether home should be displayed as an "up" affordance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` abstract void`                                                                                          | ` `[setDisplayOptions](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))`(int options, int mask) ` Set selected display options.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` abstract void`                                                                                          | ` `[setDisplayOptions](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int))`(int options) ` Set display options.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ` abstract void`                                                                                          | ` `[setDisplayShowCustomEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayShowCustomEnabled(boolean))`(boolean showCustom) ` Set whether a custom view should be displayed, if set.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` abstract void`                                                                                          | ` `[setDisplayShowHomeEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayShowHomeEnabled(boolean))`(boolean showHome) ` Set whether to include the application home affordance in the action bar.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` abstract void`                                                                                          | ` `[setDisplayShowTitleEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayShowTitleEnabled(boolean))`(boolean showTitle) ` Set whether an activity title/subtitle should be displayed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` abstract void`                                                                                          | ` `[setDisplayUseLogoEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayUseLogoEnabled(boolean))`(boolean useLogo) ` Set whether to display the activity logo rather than the activity icon.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                   | ` `[setElevation](https://developer.android.com/reference/android/support/v7/app/ActionBar#setElevation(float))`(float elevation) ` Set the Z-axis elevation of the action bar in pixels.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` void`                                                                                                   | ` `[setHideOffset](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHideOffset(int))`(int offset) ` Set the current hide offset of the action bar.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                   | ` `[setHideOnContentScrollEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHideOnContentScrollEnabled(boolean))`(boolean hideOnContentScroll) ` Enable hiding the action bar on content scroll.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                   | ` `[setHomeActionContentDescription](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeActionContentDescription(java.lang.CharSequence))`(CharSequence description) ` Set an alternate description for the Home/Up action, when enabled.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                   | ` `[setHomeActionContentDescription](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeActionContentDescription(int))`(int resId) ` Set an alternate description for the Home/Up action, when enabled.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` void`                                                                                                   | ` `[setHomeAsUpIndicator](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeAsUpIndicator(int))`(int resId) ` Set an alternate drawable to display next to the icon/logo/title when[DISPLAY_HOME_AS_UP](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_HOME_AS_UP)is enabled.                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                   | ` `[setHomeAsUpIndicator](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeAsUpIndicator(android.graphics.drawable.Drawable))`(`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` indicator) ` Set an alternate drawable to display next to the icon/logo/title when[DISPLAY_HOME_AS_UP](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_HOME_AS_UP)is enabled.                                                                                                                                                                                                                                                                             |
| ` void`                                                                                                   | ` `[setHomeButtonEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeButtonEnabled(boolean))`(boolean enabled) ` Enable or disable the "home" button in the corner of the action bar.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` abstract void`                                                                                          | ` `[setIcon](https://developer.android.com/reference/android/support/v7/app/ActionBar#setIcon(android.graphics.drawable.Drawable))`(`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` icon) ` Set the icon to display in the 'home' section of the action bar.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` abstract void`                                                                                          | ` `[setIcon](https://developer.android.com/reference/android/support/v7/app/ActionBar#setIcon(int))`(int resId) ` Set the icon to display in the 'home' section of the action bar.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` abstract void`                                                                                          | ` `[setListNavigationCallbacks](https://developer.android.com/reference/android/support/v7/app/ActionBar#setListNavigationCallbacks(android.widget.SpinnerAdapter, android.support.v7.app.ActionBar.OnNavigationListener))`(`[SpinnerAdapter](https://developer.android.com/reference/android/widget/SpinnerAdapter.html)` adapter, `[ActionBar.OnNavigationListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnNavigationListener)` callback) ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.* |
| ` abstract void`                                                                                          | ` `[setLogo](https://developer.android.com/reference/android/support/v7/app/ActionBar#setLogo(int))`(int resId) ` Set the logo to display in the 'home' section of the action bar.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` abstract void`                                                                                          | ` `[setLogo](https://developer.android.com/reference/android/support/v7/app/ActionBar#setLogo(android.graphics.drawable.Drawable))`(`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` logo) ` Set the logo to display in the 'home' section of the action bar.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` abstract void`                                                                                          | ` `[setNavigationMode](https://developer.android.com/reference/android/support/v7/app/ActionBar#setNavigationMode(int))`(int mode) ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                                                                                                                              |
| ` abstract void`                                                                                          | ` `[setSelectedNavigationItem](https://developer.android.com/reference/android/support/v7/app/ActionBar#setSelectedNavigationItem(int))`(int position) ` *This method was deprecated in API level 24.1.0. Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.*                                                                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                   | ` `[setSplitBackgroundDrawable](https://developer.android.com/reference/android/support/v7/app/ActionBar#setSplitBackgroundDrawable(android.graphics.drawable.Drawable))`(`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` d) ` Set the ActionBar's split background.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                   | ` `[setStackedBackgroundDrawable](https://developer.android.com/reference/android/support/v7/app/ActionBar#setStackedBackgroundDrawable(android.graphics.drawable.Drawable))`(`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` d) ` Set the ActionBar's stacked background.                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ` abstract void`                                                                                          | ` `[setSubtitle](https://developer.android.com/reference/android/support/v7/app/ActionBar#setSubtitle(java.lang.CharSequence))`(CharSequence subtitle) ` Set the action bar's subtitle.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` abstract void`                                                                                          | ` `[setSubtitle](https://developer.android.com/reference/android/support/v7/app/ActionBar#setSubtitle(int))`(int resId) ` Set the action bar's subtitle.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ` abstract void`                                                                                          | ` `[setTitle](https://developer.android.com/reference/android/support/v7/app/ActionBar#setTitle(java.lang.CharSequence))`(CharSequence title) ` Set the action bar's title.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` abstract void`                                                                                          | ` `[setTitle](https://developer.android.com/reference/android/support/v7/app/ActionBar#setTitle(int))`(int resId) ` Set the action bar's title.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` abstract void`                                                                                          | ` `[show](https://developer.android.com/reference/android/support/v7/app/ActionBar#show())`() ` Show the ActionBar if it is not currently showing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/ActionBar#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Constants

### DISPLAY_HOME_AS_UP

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int DISPLAY_HOME_AS_UP
```

Display the 'home' element such that it appears as an 'up' affordance. e.g. show an arrow to the left indicating the action that will be taken. Set this flag if selecting the 'home' button in the action bar to return up by a single level in your UI rather than back to the top level or front page.

Setting this option will implicitly enable interaction with the home/up button. See[setHomeButtonEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeButtonEnabled(boolean)).

<br />

**See also:**

- [setDisplayOptions(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))

Constant Value: 4 (0x00000004)  

### DISPLAY_SHOW_CUSTOM

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int DISPLAY_SHOW_CUSTOM
```

Show the custom view if one has been set.

<br />

**See also:**

- [setCustomView(View)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setCustomView(android.view.View))
- [setDisplayOptions(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))

Constant Value: 16 (0x00000010)  

### DISPLAY_SHOW_HOME

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int DISPLAY_SHOW_HOME
```

Show 'home' elements in this action bar, leaving more space for other navigation elements. This includes logo and icon.

<br />

**See also:**

- [setDisplayOptions(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))

Constant Value: 2 (0x00000002)  

### DISPLAY_SHOW_TITLE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int DISPLAY_SHOW_TITLE
```

Show the activity title and subtitle, if present.

<br />

**See also:**

- [setTitle(CharSequence)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setTitle(java.lang.CharSequence))
- [setTitle(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setTitle(int))
- [setSubtitle(CharSequence)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setSubtitle(java.lang.CharSequence))
- [setSubtitle(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setSubtitle(int))
- [setDisplayOptions(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))

Constant Value: 8 (0x00000008)  

### DISPLAY_USE_LOGO

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int DISPLAY_USE_LOGO
```

Use logo instead of icon if available. This flag will cause appropriate navigation modes to use a wider logo in place of the standard icon.

<br />

**See also:**

- [setDisplayOptions(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))

Constant Value: 1 (0x00000001)  

### NAVIGATION_MODE_LIST

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int NAVIGATION_MODE_LIST
```

<br />

**This constant was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

List navigation mode. Instead of static title text this mode presents a list menu for navigation within the activity. e.g. this might be presented to the user as a dropdown list.

<br />

Constant Value: 1 (0x00000001)  

### NAVIGATION_MODE_STANDARD

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int NAVIGATION_MODE_STANDARD
```

<br />

**This constant was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Standard navigation mode. Consists of either a logo or icon and title text with an optional subtitle. Clicking any of these elements will dispatch onOptionsItemSelected to the host Activity with a MenuItem with item ID android.R.id.home.

<br />

Constant Value: 0 (0x00000000)  

### NAVIGATION_MODE_TABS

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int NAVIGATION_MODE_TABS
```

<br />

**This constant was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Tab navigation mode. Instead of static title text this mode presents a series of tabs for navigation within the activity.

<br />

Constant Value: 2 (0x00000002)

## Public constructors

### ActionBar

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ActionBar ()
```

<br />

<br />

## Public methods

### addOnMenuVisibilityListener

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void addOnMenuVisibilityListener (ActionBar.OnMenuVisibilityListener listener)
```

Add a listener that will respond to menu visibility change events.

<br />

|                                    Parameters                                    ||
|------------|----------------------------------------------------------------------|
| `listener` | `ActionBar.OnMenuVisibilityListener`: The new listener to add <br /> |

### addTab

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void addTab (ActionBar.Tab tab, 
                int position)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Add a tab for use in tabbed navigation mode. The tab will be inserted at`position`. If this is the first tab to be added it will become the selected tab.

<br />

|                      Parameters                       ||
|------------|-------------------------------------------|
| `tab`      | `ActionBar.Tab`: The tab to add <br />    |
| `position` | `int`: The new position of the tab <br /> |

### addTab

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void addTab (ActionBar.Tab tab)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Add a tab for use in tabbed navigation mode. The tab will be added at the end of the list. If this is the first tab to be added it will become the selected tab.

<br />

|                Parameters                 ||
|-------|------------------------------------|
| `tab` | `ActionBar.Tab`: Tab to add <br /> |

### addTab

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void addTab (ActionBar.Tab tab, 
                int position, 
                boolean setSelected)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Add a tab for use in tabbed navigation mode. The tab will be inserted at`position`.

<br />

|                                       Parameters                                       ||
|---------------|-------------------------------------------------------------------------|
| `tab`         | `ActionBar.Tab`: The tab to add <br />                                  |
| `position`    | `int`: The new position of the tab <br />                               |
| `setSelected` | `boolean`: True if the added tab should become the selected tab. <br /> |

### addTab

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void addTab (ActionBar.Tab tab, 
                boolean setSelected)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Add a tab for use in tabbed navigation mode. The tab will be added at the end of the list.

<br />

|                                       Parameters                                       ||
|---------------|-------------------------------------------------------------------------|
| `tab`         | `ActionBar.Tab`: Tab to add <br />                                      |
| `setSelected` | `boolean`: True if the added tab should become the selected tab. <br /> |

### getCustomView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
View getCustomView ()
```

<br />

<br />

|                                                 Returns                                                 ||
|------------------------------------------------------------------------|---------------------------------|
| [View](https://developer.android.com/reference/android/view/View.html) | The current custom view. <br /> |

### getDisplayOptions

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getDisplayOptions ()
```

<br />

<br />

|                      Returns                      ||
|-------|--------------------------------------------|
| `int` | The current set of display options. <br /> |

### getElevation

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getElevation ()
```

Get the Z-axis elevation of the action bar in pixels.

The action bar's elevation is the distance it is placed from its parent surface. Higher values are closer to the user.

<br />

<br />

|                  Returns                  ||
|---------|----------------------------------|
| `float` | Elevation value in pixels <br /> |

### getHeight

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getHeight ()
```

Retrieve the current height of the ActionBar.

<br />

|               Returns                ||
|-------|-------------------------------|
| `int` | The ActionBar's height <br /> |

### getHideOffset

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getHideOffset ()
```

Return the current vertical offset of the action bar.

The action bar's current hide offset is the distance that the action bar is currently scrolled offscreen in pixels. The valid range is 0 (fully visible) to the action bar's current measured[height](https://developer.android.com/reference/android/support/v7/app/ActionBar#getHeight())(fully invisible).

<br />

<br />

|                                    Returns                                    ||
|-------|------------------------------------------------------------------------|
| `int` | The action bar's offset toward its fully hidden state in pixels <br /> |

### getNavigationItemCount

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getNavigationItemCount ()
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Get the number of navigation items present in the current navigation mode.

<br />

|                  Returns                  ||
|-------|------------------------------------|
| `int` | Number of navigation items. <br /> |

### getNavigationMode

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getNavigationMode ()
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Returns the current navigation mode. The result will be one of:

- [NAVIGATION_MODE_STANDARD](https://developer.android.com/reference/android/support/v7/app/ActionBar#NAVIGATION_MODE_STANDARD)
- [NAVIGATION_MODE_LIST](https://developer.android.com/reference/android/support/v7/app/ActionBar#NAVIGATION_MODE_LIST)
- [NAVIGATION_MODE_TABS](https://developer.android.com/reference/android/support/v7/app/ActionBar#NAVIGATION_MODE_TABS)

<br />

<br />

|                  Returns                   ||
|-------|-------------------------------------|
| `int` | The current navigation mode. <br /> |

### getSelectedNavigationIndex

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getSelectedNavigationIndex ()
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Get the position of the selected navigation item in list or tabbed navigation modes.

<br />

|                   Returns                    ||
|-------|---------------------------------------|
| `int` | Position of the selected item. <br /> |

### getSelectedTab

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ActionBar.Tab getSelectedTab ()
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Returns the currently selected tab if in tabbed navigation mode and there is at least one tab present.

<br />

|                                                                 Returns                                                                  ||
|-----------------------------------------------------------------------------------------------|-------------------------------------------|
| [ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab) | The currently selected tab or null <br /> |

### getSubtitle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
CharSequence getSubtitle ()
```

Returns the current ActionBar subtitle in standard mode. Returns null if[getNavigationMode()](https://developer.android.com/reference/android/support/v7/app/ActionBar#getNavigationMode())would not return[NAVIGATION_MODE_STANDARD](https://developer.android.com/reference/android/support/v7/app/ActionBar#NAVIGATION_MODE_STANDARD).

<br />

|                            Returns                             ||
|----------------|------------------------------------------------|
| `CharSequence` | The current ActionBar subtitle or null. <br /> |

### getTabAt

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ActionBar.Tab getTabAt (int index)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Returns the tab at the specified index.

<br />

|                      Parameters                       ||
|---------|----------------------------------------------|
| `index` | `int`: Index value in the range 0-get <br /> |

|                                                Returns                                                ||
|-----------------------------------------------------------------------------------------------|--------|
| [ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab) | <br /> |

### getTabCount

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getTabCount ()
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Returns the number of tabs currently registered with the action bar.

<br />

|         Returns         ||
|-------|------------------|
| `int` | Tab count <br /> |

### getThemedContext

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Context getThemedContext ()
```

Returns a[Context](https://developer.android.com/reference/android/content/Context.html)with an appropriate theme for creating views that will appear in the action bar. If you are inflating or instantiating custom views that will appear in an action bar, you should use the Context returned by this method. (This includes adapters used for list navigation mode.) This will ensure that views contrast properly against the action bar.

<br />

|                                                           Returns                                                           ||
|---------------------------------------------------------------------------------|--------------------------------------------|
| [Context](https://developer.android.com/reference/android/content/Context.html) | A themed Context for creating views <br /> |

### getTitle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
CharSequence getTitle ()
```

Returns the current ActionBar title in standard mode. Returns null if[getNavigationMode()](https://developer.android.com/reference/android/support/v7/app/ActionBar#getNavigationMode())would not return[NAVIGATION_MODE_STANDARD](https://developer.android.com/reference/android/support/v7/app/ActionBar#NAVIGATION_MODE_STANDARD).

<br />

|                           Returns                           ||
|----------------|---------------------------------------------|
| `CharSequence` | The current ActionBar title or null. <br /> |

### hide

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void hide ()
```

Hide the ActionBar if it is currently showing. If the window hosting the ActionBar does not have the feature[FEATURE_ACTION_BAR_OVERLAY](https://developer.android.com/reference/android/view/Window.html#FEATURE_ACTION_BAR_OVERLAY)it will resize application content to fit the new space available.

Instead of calling this function directly, you can also cause an ActionBar using the overlay feature to hide through[View.SYSTEM_UI_FLAG_FULLSCREEN](https://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_FULLSCREEN). Hiding the ActionBar through this system UI flag allows you to more seamlessly hide it in conjunction with other screen decorations.

<br />

### isHideOnContentScrollEnabled

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isHideOnContentScrollEnabled ()
```

Return whether the action bar is configured to scroll out of sight along with a[nested scrolling child](https://developer.android.com/reference/android/view/View.html#setNestedScrollingEnabled(boolean)).

<br />

|                           Returns                           ||
|-----------|--------------------------------------------------|
| `boolean` | true if hide-on-content-scroll is enabled <br /> |

**See also:**

- [setHideOnContentScrollEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHideOnContentScrollEnabled(boolean))  

### isShowing

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isShowing ()
```

<br />

<br />

|                                Returns                                ||
|-----------|------------------------------------------------------------|
| `boolean` | `true`if the ActionBar is showing,`false`otherwise. <br /> |

### newTab

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ActionBar.Tab newTab ()
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Create and return a new[ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab). This tab will not be included in the action bar until it is added.

<br />

|                                                     Returns                                                     ||
|-----------------------------------------------------------------------------------------------|------------------|
| [ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab) | A new Tab <br /> |

**See also:**

- [addTab(Tab)](https://developer.android.com/reference/android/support/v7/app/ActionBar#addTab(android.support.v7.app.ActionBar.Tab))  

### removeAllTabs

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void removeAllTabs ()
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Remove all tabs from the action bar and deselect the current tab.

<br />

### removeOnMenuVisibilityListener

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void removeOnMenuVisibilityListener (ActionBar.OnMenuVisibilityListener listener)
```

Remove a menu visibility listener. This listener will no longer receive menu visibility change events.

<br />

|                                               Parameters                                                ||
|------------|---------------------------------------------------------------------------------------------|
| `listener` | `ActionBar.OnMenuVisibilityListener`: A listener to remove that was previously added <br /> |

### removeTab

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void removeTab (ActionBar.Tab tab)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Remove a tab from the action bar. If the removed tab was selected it will be deselected and another tab will be selected if present.

<br />

|                    Parameters                    ||
|-------|-------------------------------------------|
| `tab` | `ActionBar.Tab`: The tab to remove <br /> |

### removeTabAt

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void removeTabAt (int position)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Remove a tab from the action bar. If the removed tab was selected it will be deselected and another tab will be selected if present.

<br />

|                       Parameters                        ||
|------------|---------------------------------------------|
| `position` | `int`: Position of the tab to remove <br /> |

### selectTab

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void selectTab (ActionBar.Tab tab)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Select the specified tab. If it is not a child of this action bar it will be added.

Note: If you want to select by index, use[setSelectedNavigationItem(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setSelectedNavigationItem(int)).

<br />

<br />

|                  Parameters                  ||
|-------|---------------------------------------|
| `tab` | `ActionBar.Tab`: Tab to select <br /> |

### setBackgroundDrawable

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setBackgroundDrawable (Drawable d)
```

Set the ActionBar's background. This will be used for the primary action bar.

<br />

|                 Parameters                  ||
|-----|----------------------------------------|
| `d` | `Drawable`: Background drawable <br /> |

**See also:**

- [setStackedBackgroundDrawable(Drawable)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setStackedBackgroundDrawable(android.graphics.drawable.Drawable))
- [setSplitBackgroundDrawable(Drawable)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setSplitBackgroundDrawable(android.graphics.drawable.Drawable))  

### setCustomView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setCustomView (View view)
```

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. Common use cases for custom navigation views might include an auto-suggesting address bar for a browser or other navigation mechanisms that do not translate well to provided navigation modes.

<br />

|                                Parameters                                ||
|--------|------------------------------------------------------------------|
| `view` | `View`: Custom navigation view to place in the ActionBar. <br /> |

### setCustomView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setCustomView (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. Common use cases for custom navigation views might include an auto-suggesting address bar for a browser or other navigation mechanisms that do not translate well to provided navigation modes.

The display option[DISPLAY_SHOW_CUSTOM](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_SHOW_CUSTOM)must be set for the custom view to be displayed.

<br />

<br />

|                                  Parameters                                   ||
|---------|----------------------------------------------------------------------|
| `resId` | `int`: Resource ID of a layout to inflate into the ActionBar. <br /> |

**See also:**

- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))  

### setCustomView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setCustomView (View view, 
                ActionBar.LayoutParams layoutParams)
```

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. Common use cases for custom navigation views might include an auto-suggesting address bar for a browser or other navigation mechanisms that do not translate well to provided navigation modes.

The display option[DISPLAY_SHOW_CUSTOM](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_SHOW_CUSTOM)must be set for the custom view to be displayed.

<br />

<br />

|                                           Parameters                                            ||
|----------------|---------------------------------------------------------------------------------|
| `view`         | `View`: Custom navigation view to place in the ActionBar. <br />                |
| `layoutParams` | `ActionBar.LayoutParams`: How this custom view should layout in the bar. <br /> |

**See also:**

- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))  

### setDisplayHomeAsUpEnabled

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDisplayHomeAsUpEnabled (boolean showHomeAsUp)
```

Set whether home should be displayed as an "up" affordance. Set this to true if selecting "home" returns up by a single level in your UI rather than back to the top level or front page.

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

<br />

|                                                                  Parameters                                                                   ||
|----------------|-------------------------------------------------------------------------------------------------------------------------------|
| `showHomeAsUp` | `boolean`: true to show the user that selecting home will return one level up rather than to the top level of the app. <br /> |

**See also:**

- [setDisplayOptions(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))  

### setDisplayOptions

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDisplayOptions (int options, 
                int mask)
```

Set selected display options. Only the options specified by mask will be changed. To change all display option bits at once, see[setDisplayOptions(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int)).

Example: setDisplayOptions(0, DISPLAY_SHOW_HOME) will disable the[DISPLAY_SHOW_HOME](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_SHOW_HOME)option. setDisplayOptions(DISPLAY_SHOW_HOME, DISPLAY_SHOW_HOME \| DISPLAY_USE_LOGO) will enable[DISPLAY_SHOW_HOME](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_SHOW_HOME)and disable[DISPLAY_USE_LOGO](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_USE_LOGO).

<br />

|                                                 Parameters                                                 ||
|-----------|-------------------------------------------------------------------------------------------------|
| `options` | `int`: A combination of the bits defined by the DISPLAY_ constants defined in ActionBar. <br /> |
| `mask`    | `int`: A bit mask declaring which display options should be changed. <br />                     |

### setDisplayOptions

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDisplayOptions (int options)
```

Set display options. This changes all display option bits at once. To change a limited subset of display options, see[setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int)).

<br />

|                                                 Parameters                                                 ||
|-----------|-------------------------------------------------------------------------------------------------|
| `options` | `int`: A combination of the bits defined by the DISPLAY_ constants defined in ActionBar. <br /> |

### setDisplayShowCustomEnabled

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDisplayShowCustomEnabled (boolean showCustom)
```

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

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

<br />

|                                                 Parameters                                                  ||
|--------------|-----------------------------------------------------------------------------------------------|
| `showCustom` | `boolean`: true if the currently set custom view should be displayed, false otherwise. <br /> |

**See also:**

- [setDisplayOptions(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))  

### setDisplayShowHomeEnabled

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDisplayShowHomeEnabled (boolean showHome)
```

Set whether to include the application home affordance in the action bar. Home is presented as either an activity icon or logo.

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

<br />

|                            Parameters                             ||
|------------|-------------------------------------------------------|
| `showHome` | `boolean`: true to show home, false otherwise. <br /> |

**See also:**

- [setDisplayOptions(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))  

### setDisplayShowTitleEnabled

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDisplayShowTitleEnabled (boolean showTitle)
```

Set whether an activity title/subtitle should be displayed.

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

<br />

|                                 Parameters                                  ||
|-------------|----------------------------------------------------------------|
| `showTitle` | `boolean`: true to display a title/subtitle if present. <br /> |

**See also:**

- [setDisplayOptions(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))  

### setDisplayUseLogoEnabled

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDisplayUseLogoEnabled (boolean useLogo)
```

Set whether to display the activity logo rather than the activity icon. A logo is often a wider, more detailed image.

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

<br />

|                                         Parameters                                          ||
|-----------|----------------------------------------------------------------------------------|
| `useLogo` | `boolean`: true to use the activity logo, false to use the activity icon. <br /> |

**See also:**

- [setDisplayOptions(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))  

### setElevation

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setElevation (float elevation)
```

Set the Z-axis elevation of the action bar in pixels.

The action bar's elevation is the distance it is placed from its parent surface. Higher values are closer to the user.

<br />

<br />

|                       Parameters                       ||
|-------------|-------------------------------------------|
| `elevation` | `float`: Elevation value in pixels <br /> |

### setHideOffset

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setHideOffset (int offset)
```

Set the current hide offset of the action bar.

The action bar's current hide offset is the distance that the action bar is currently scrolled offscreen in pixels. The valid range is 0 (fully visible) to the action bar's current measured[height](https://developer.android.com/reference/android/support/v7/app/ActionBar#getHeight())(fully invisible).

<br />

<br />

|                                        Parameters                                        ||
|----------|--------------------------------------------------------------------------------|
| `offset` | `int`: The action bar's offset toward its fully hidden state in pixels. <br /> |

### setHideOnContentScrollEnabled

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setHideOnContentScrollEnabled (boolean hideOnContentScroll)
```

Enable hiding the action bar on content scroll.

If enabled, the action bar will scroll out of sight along with a[nested scrolling child](https://developer.android.com/reference/android/view/View.html#setNestedScrollingEnabled(boolean))view's content. The action bar must be in[overlay mode](https://developer.android.com/reference/android/view/Window.html#FEATURE_ACTION_BAR_OVERLAY)to enable hiding on content scroll.

When partially scrolled off screen the action bar is considered[hidden](https://developer.android.com/reference/android/support/v7/app/ActionBar#hide()). A call to[show](https://developer.android.com/reference/android/support/v7/app/ActionBar#show())will cause it to return to full view.

<br />

<br />

|                                    Parameters                                     ||
|-----------------------|------------------------------------------------------------|
| `hideOnContentScroll` | `boolean`: true to enable hiding on content scroll. <br /> |

### setHomeActionContentDescription

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setHomeActionContentDescription (CharSequence description)
```

Set an alternate description for the Home/Up action, when enabled.

This description is commonly used for accessibility/screen readers when the Home action is enabled. (See[setDisplayHomeAsUpEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayHomeAsUpEnabled(boolean)).) Examples of this are, "Navigate Home" or "Navigate Up" depending on the[DISPLAY_HOME_AS_UP](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_HOME_AS_UP)display option. If you have changed the home-as-up indicator using[setHomeAsUpIndicator(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeAsUpIndicator(int))to indicate more specific functionality such as a sliding drawer, you should also set this to accurately describe the action.

Setting this to`null`will use the system default description.

<br />

<br />

|                                       Parameters                                       ||
|---------------|-------------------------------------------------------------------------|
| `description` | `CharSequence`: New description for the Home action when enabled <br /> |

**See also:**

- [setHomeAsUpIndicator(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeAsUpIndicator(int))
- [setHomeAsUpIndicator(android.graphics.drawable.Drawable)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeAsUpIndicator(android.graphics.drawable.Drawable))  

### setHomeActionContentDescription

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setHomeActionContentDescription (int resId)
```

Set an alternate description for the Home/Up action, when enabled.

This description is commonly used for accessibility/screen readers when the Home action is enabled. (See[setDisplayHomeAsUpEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayHomeAsUpEnabled(boolean)).) Examples of this are, "Navigate Home" or "Navigate Up" depending on the[DISPLAY_HOME_AS_UP](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_HOME_AS_UP)display option. If you have changed the home-as-up indicator using[setHomeAsUpIndicator(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeAsUpIndicator(int))to indicate more specific functionality such as a sliding drawer, you should also set this to accurately describe the action.

Setting this to`0`will use the system default description.

<br />

<br />

|                                                  Parameters                                                   ||
|---------|------------------------------------------------------------------------------------------------------|
| `resId` | `int`: Resource ID of a string to use as the new description for the Home action when enabled <br /> |

**See also:**

- [setHomeAsUpIndicator(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeAsUpIndicator(int))
- [setHomeAsUpIndicator(android.graphics.drawable.Drawable)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeAsUpIndicator(android.graphics.drawable.Drawable))  

### setHomeAsUpIndicator

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setHomeAsUpIndicator (int resId)
```

Set an alternate drawable to display next to the icon/logo/title when[DISPLAY_HOME_AS_UP](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_HOME_AS_UP)is enabled. This can be useful if you are using this mode to display an alternate selection for up navigation, such as a sliding drawer.

If you pass`0`to this method, the default drawable from the theme will be used.

If you implement alternate or intermediate behavior around Up, you should also call[setHomeActionContentDescription()](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeActionContentDescription(int))to provide a correct description of the action for accessibility support.

<br />

<br />

|                                                    Parameters                                                    ||
|---------|---------------------------------------------------------------------------------------------------------|
| `resId` | `int`: Resource ID of a drawable to use for the up indicator, or null to use the theme's default <br /> |

**See also:**

- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))
- [setDisplayHomeAsUpEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayHomeAsUpEnabled(boolean))
- [setHomeActionContentDescription(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeActionContentDescription(int))  

### setHomeAsUpIndicator

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setHomeAsUpIndicator (Drawable indicator)
```

Set an alternate drawable to display next to the icon/logo/title when[DISPLAY_HOME_AS_UP](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_HOME_AS_UP)is enabled. This can be useful if you are using this mode to display an alternate selection for up navigation, such as a sliding drawer.

If you pass`null`to this method, the default drawable from the theme will be used.

If you implement alternate or intermediate behavior around Up, you should also call[setHomeActionContentDescription()](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeActionContentDescription(int))to provide a correct description of the action for accessibility support.

<br />

<br />

|                                                 Parameters                                                 ||
|-------------|-----------------------------------------------------------------------------------------------|
| `indicator` | `Drawable`: A drawable to use for the up indicator, or null to use the theme's default <br /> |

**See also:**

- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))
- [setDisplayHomeAsUpEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayHomeAsUpEnabled(boolean))
- [setHomeActionContentDescription(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setHomeActionContentDescription(int))  

### setHomeButtonEnabled

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setHomeButtonEnabled (boolean enabled)
```

Enable or disable the "home" button in the corner of the action bar. (Note that this is the application home/up affordance on the action bar, not the system wide home button.)

This defaults to true for packages targeting \< API 14. For packages targeting API 14 or greater, the application should call this method to enable interaction with the home/up affordance.

Setting the[DISPLAY_HOME_AS_UP](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_HOME_AS_UP)display option will automatically enable the home button.

<br />

|                                           Parameters                                           ||
|-----------|-------------------------------------------------------------------------------------|
| `enabled` | `boolean`: true to enable the home button, false to disable the home button. <br /> |

### setIcon

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setIcon (Drawable icon)
```

Set the icon to display in the 'home' section of the action bar. The action bar will use an icon specified by its style or the activity icon by default. Whether the home section shows an icon or logo is controlled by the display option[DISPLAY_USE_LOGO](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_USE_LOGO).

<br />

|                       Parameters                        ||
|--------|-------------------------------------------------|
| `icon` | `Drawable`: Drawable to show as an icon. <br /> |

**See also:**

- [setDisplayUseLogoEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayUseLogoEnabled(boolean))
- [setDisplayShowHomeEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayShowHomeEnabled(boolean))  

### setIcon

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setIcon (int resId)
```

Set the icon to display in the 'home' section of the action bar. The action bar will use an icon specified by its style or the activity icon by default. Whether the home section shows an icon or logo is controlled by the display option[DISPLAY_USE_LOGO](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_USE_LOGO).

<br />

|                              Parameters                              ||
|---------|-------------------------------------------------------------|
| `resId` | `int`: Resource ID of a drawable to show as an icon. <br /> |

**See also:**

- [setDisplayUseLogoEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayUseLogoEnabled(boolean))
- [setDisplayShowHomeEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayShowHomeEnabled(boolean))  

### setListNavigationCallbacks

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setListNavigationCallbacks (SpinnerAdapter adapter, 
                ActionBar.OnNavigationListener callback)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Set the adapter and navigation callback for list navigation mode. The supplied adapter will provide views for the expanded list as well as the currently selected item. (These may be displayed differently.) The supplied OnNavigationListener will alert the application when the user changes the current list selection.

<br />

|                                                                                    Parameters                                                                                    ||
|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `adapter`  | `SpinnerAdapter`: An adapter that will provide views both to display the current navigation selection and populate views within the dropdown navigation menu. <br /> |
| `callback` | `ActionBar.OnNavigationListener`: An OnNavigationListener that will receive events when the user selects a navigation item. <br />                                   |

### setLogo

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setLogo (int resId)
```

Set the logo to display in the 'home' section of the action bar. The action bar will use a logo specified by its style or the activity logo by default. Whether the home section shows an icon or logo is controlled by the display option[DISPLAY_USE_LOGO](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_USE_LOGO).

<br />

|                             Parameters                              ||
|---------|------------------------------------------------------------|
| `resId` | `int`: Resource ID of a drawable to show as a logo. <br /> |

**See also:**

- [setDisplayUseLogoEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayUseLogoEnabled(boolean))
- [setDisplayShowHomeEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayShowHomeEnabled(boolean))  

### setLogo

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setLogo (Drawable logo)
```

Set the logo to display in the 'home' section of the action bar. The action bar will use a logo specified by its style or the activity logo by default. Whether the home section shows an icon or logo is controlled by the display option[DISPLAY_USE_LOGO](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_USE_LOGO).

<br />

|                       Parameters                       ||
|--------|------------------------------------------------|
| `logo` | `Drawable`: Drawable to show as a logo. <br /> |

**See also:**

- [setDisplayUseLogoEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayUseLogoEnabled(boolean))
- [setDisplayShowHomeEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayShowHomeEnabled(boolean))  

### setNavigationMode

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setNavigationMode (int mode)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Set the current navigation mode.

<br />

|                 Parameters                 ||
|--------|------------------------------------|
| `mode` | `int`: The new mode to set. <br /> |

**See also:**

- [NAVIGATION_MODE_STANDARD](https://developer.android.com/reference/android/support/v7/app/ActionBar#NAVIGATION_MODE_STANDARD)
- [NAVIGATION_MODE_LIST](https://developer.android.com/reference/android/support/v7/app/ActionBar#NAVIGATION_MODE_LIST)
- [NAVIGATION_MODE_TABS](https://developer.android.com/reference/android/support/v7/app/ActionBar#NAVIGATION_MODE_TABS)  

### setSelectedNavigationItem

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setSelectedNavigationItem (int position)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other[common navigation patterns](http://developer.android.com/design/patterns/navigation.html)instead.

Set the selected navigation item in list or tabbed navigation modes.

<br />

|                        Parameters                         ||
|------------|-----------------------------------------------|
| `position` | `int`: Position of the item to select. <br /> |

### setSplitBackgroundDrawable

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setSplitBackgroundDrawable (Drawable d)
```

Set the ActionBar's split background. This will appear in the split action bar containing menu-provided action buttons on some devices and configurations.

You can enable split action bar with[uiOptions](https://developer.android.com/reference/android/R.attr#uiOptions)

<br />

|                          Parameters                           ||
|-----|----------------------------------------------------------|
| `d` | `Drawable`: Background drawable for the split bar <br /> |

### setStackedBackgroundDrawable

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setStackedBackgroundDrawable (Drawable d)
```

Set the ActionBar's stacked background. This will appear in the second row/stacked bar on some devices and configurations.

<br />

|                           Parameters                            ||
|-----|------------------------------------------------------------|
| `d` | `Drawable`: Background drawable for the stacked row <br /> |

### setSubtitle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setSubtitle (CharSequence subtitle)
```

Set the action bar's subtitle. This will only be displayed if[DISPLAY_SHOW_TITLE](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_SHOW_TITLE)is set. Set to null to disable the subtitle entirely.

<br />

|                     Parameters                     ||
|------------|----------------------------------------|
| `subtitle` | `CharSequence`: Subtitle to set <br /> |

**See also:**

- [setSubtitle(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setSubtitle(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))  

### setSubtitle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setSubtitle (int resId)
```

Set the action bar's subtitle. This will only be displayed if[DISPLAY_SHOW_TITLE](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_SHOW_TITLE)is set.

<br />

|                          Parameters                          ||
|---------|-----------------------------------------------------|
| `resId` | `int`: Resource ID of subtitle string to set <br /> |

**See also:**

- [setSubtitle(CharSequence)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setSubtitle(java.lang.CharSequence))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))  

### setTitle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setTitle (CharSequence title)
```

Set the action bar's title. This will only be displayed if[DISPLAY_SHOW_TITLE](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_SHOW_TITLE)is set.

<br />

|                  Parameters                  ||
|---------|-------------------------------------|
| `title` | `CharSequence`: Title to set <br /> |

**See also:**

- [setTitle(int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setTitle(int))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))  

### setTitle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setTitle (int resId)
```

Set the action bar's title. This will only be displayed if[DISPLAY_SHOW_TITLE](https://developer.android.com/reference/android/support/v7/app/ActionBar#DISPLAY_SHOW_TITLE)is set.

<br />

|                        Parameters                         ||
|---------|--------------------------------------------------|
| `resId` | `int`: Resource ID of title string to set <br /> |

**See also:**

- [setTitle(CharSequence)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setTitle(java.lang.CharSequence))
- [setDisplayOptions(int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBar#setDisplayOptions(int, int))  

### show

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void show ()
```

Show the ActionBar if it is not currently showing. If the window hosting the ActionBar does not have the feature[FEATURE_ACTION_BAR_OVERLAY](https://developer.android.com/reference/android/view/Window.html#FEATURE_ACTION_BAR_OVERLAY)it will resize application content to fit the new space available.

If you are hiding the ActionBar through[View.SYSTEM_UI_FLAG_FULLSCREEN](https://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_FULLSCREEN), you should not call this function directly.

<br />

-

  ## Interfaces

  - [ActionBar.OnMenuVisibilityListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnMenuVisibilityListener)
  - [ActionBar.OnNavigationListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnNavigationListener)
  - [ActionBar.TabListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.TabListener)
  - [ActionBarDrawerToggle.Delegate](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.Delegate)
  - [ActionBarDrawerToggle.DelegateProvider](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.DelegateProvider)
  - [AppCompatCallback](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback)
-

  ## Classes

  - [ActionBar](https://developer.android.com/reference/android/support/v7/app/ActionBar)
  - [ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams)
  - [ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab)
  - [ActionBarDrawerToggle](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle)
  - [AlertDialog](https://developer.android.com/reference/android/support/v7/app/AlertDialog)
  - [AlertDialog.Builder](https://developer.android.com/reference/android/support/v7/app/AlertDialog.Builder)
  - [AppCompatActivity](https://developer.android.com/reference/android/support/v7/app/AppCompatActivity)
  - [AppCompatDelegate](https://developer.android.com/reference/android/support/v7/app/AppCompatDelegate)
  - [AppCompatDialog](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog)
  - [AppCompatDialogFragment](https://developer.android.com/reference/android/support/v7/app/AppCompatDialogFragment)
  - [AppCompatViewInflater](https://developer.android.com/reference/android/support/v7/app/AppCompatViewInflater)
  - [MediaRouteActionProvider](https://developer.android.com/reference/android/support/v7/app/MediaRouteActionProvider)
  - [MediaRouteButton](https://developer.android.com/reference/android/support/v7/app/MediaRouteButton)
  - [MediaRouteChooserDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialog)
  - [MediaRouteChooserDialogFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialogFragment)
  - [MediaRouteControllerDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialog)
  - [MediaRouteControllerDialogFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialogFragment)
  - [MediaRouteDialogFactory](https://developer.android.com/reference/android/support/v7/app/MediaRouteDialogFactory)
  - [MediaRouteDiscoveryFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteDiscoveryFragment)