Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/app/ActionBar#nestedclasses) \| [Constants](https://developer.android.com/reference/android/app/ActionBar#constants) \| [Ctors](https://developer.android.com/reference/android/app/ActionBar#pubctors) \| [Methods](https://developer.android.com/reference/android/app/ActionBar#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/ActionBar#inhmethods)

# ActionBar

*** ** * ** ***

` public abstract class ActionBar `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.ActionBar |

<br />

*** ** * ** ***

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

Beginning with Android 3.0 (API level 11), the action bar appears at the top of an activity's window when the activity uses the system's `https://developer.android.com/reference/android/R.style#Theme_Holo` theme (or one of its descendant themes), which is the default. You may otherwise add the action bar by calling `https://developer.android.com/reference/android/view/Window#requestFeature(int)` or by declaring it in a custom theme with the `https://developer.android.com/reference/android/R.styleable#Theme_windowActionBar` property.

Beginning with Android L (API level 21), 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 `https://developer.android.com/reference/android/R.styleable#Theme_windowActionBar` attribute to `false` or otherwise not request the window feature.

By adjusting the window features requested by the theme and the layouts used for an Activity's content view, an app can use the standard system action bar on older platform releases and the newer inline toolbars on newer platform releases. The `ActionBar` object obtained from the Activity can be used to control either configuration transparently.

When using the Holo themes the action bar shows the application icon on the left, followed by the activity title. 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.

When using the Material themes (default in API 21 or newer) 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 `https://developer.android.com/reference/android/app/ActionBar#setLogo(int)` in place of their standard title text.

From your activity, you can retrieve an instance of `https://developer.android.com/reference/android/app/ActionBar` by calling `https://developer.android.com/reference/android/app/Activity#getActionBar()`.

In some cases, the action bar may be overlayed by another bar that enables contextual actions, using an `https://developer.android.com/reference/android/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 `https://developer.android.com/reference/android/view/ActionMode` APIs are distinct and independent from those for `https://developer.android.com/reference/android/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` | `https://developer.android.com/reference/android/app/ActionBar.LayoutParams` Per-child layout information associated with action bar custom views. |
| ` interface` | `https://developer.android.com/reference/android/app/ActionBar.OnMenuVisibilityListener` Listener for receiving events when action bar menus are shown or hidden. |
| ` interface` | `https://developer.android.com/reference/android/app/ActionBar.OnNavigationListener` *This interface was deprecated in API level 21. 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` | `https://developer.android.com/reference/android/app/ActionBar.Tab` *This class was deprecated in API level 21. 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` | `https://developer.android.com/reference/android/app/ActionBar.TabListener` *This interface was deprecated in API level 21. 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` | `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_HOME_AS_UP` Display the 'home' element such that it appears as an 'up' affordance. |
| `int` | `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_CUSTOM` Show the custom view if one has been set. |
| `int` | `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_HOME` Show 'home' elements in this action bar, leaving more space for other navigation elements. |
| `int` | `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_TITLE` Show the activity title and subtitle, if present. |
| `int` | `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_USE_LOGO` Use logo instead of icon if available. |
| `int` | `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_LIST` *This constant was deprecated in API level 21. 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` | `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_STANDARD` *This constant was deprecated in API level 21. 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` | `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_TABS` *This constant was deprecated in API level 21. 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 ||
|---|---|
| ` https://developer.android.com/reference/android/app/ActionBar#ActionBar()() ` |

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

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### DISPLAY_HOME_AS_UP

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final 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 `https://developer.android.com/reference/android/app/ActionBar#setHomeButtonEnabled(boolean)`.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

Constant Value: 4 (0x00000004)

### DISPLAY_SHOW_CUSTOM

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int DISPLAY_SHOW_CUSTOM
```

Show the custom view if one has been set.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setCustomView(android.view.View)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

Constant Value: 16 (0x00000010)

### DISPLAY_SHOW_HOME

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final 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:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

Constant Value: 2 (0x00000002)

### DISPLAY_SHOW_TITLE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int DISPLAY_SHOW_TITLE
```

Show the activity title and subtitle, if present.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setTitle(java.lang.CharSequence)`
- `https://developer.android.com/reference/android/app/ActionBar#setTitle(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setSubtitle(java.lang.CharSequence)`
- `https://developer.android.com/reference/android/app/ActionBar#setSubtitle(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

Constant Value: 8 (0x00000008)

### DISPLAY_USE_LOGO

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final 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:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

Constant Value: 1 (0x00000001)

### NAVIGATION_MODE_LIST

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_MODE_LIST
```

<br />

**This constant was deprecated in API level 21.**   

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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_MODE_STANDARD
```

<br />

**This constant was deprecated in API level 21.**   

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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_MODE_TABS
```

<br />

**This constant was deprecated in API level 21.**   

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

```
public ActionBar ()
```

<br />

<br />

## Public methods

### addOnMenuVisibilityListener

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

<br />

**This method was deprecated in API level 21.**   

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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

<br />

**This method was deprecated in API level 21.**   

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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

<br />

**This method was deprecated in API level 21.**   

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 insterted 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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

<br />

**This method was deprecated in API level 21.**   

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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract View getCustomView ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | The current custom view. <br /> |

### getDisplayOptions

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getDisplayOptions ()
```

<br />

<br />

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

### getElevation

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getHeight ()
```

Retrieve the current height of the ActionBar.

<br />

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

### getHideOffset

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 `https://developer.android.com/reference/android/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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getNavigationItemCount ()
```

<br />

**This method was deprecated in API level 21.**   

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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getNavigationMode ()
```

<br />

**This method was deprecated in API level 21.**   

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:

- `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_STANDARD`
- `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_LIST`
- `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_TABS`

<br />

<br />

| Returns ||
|---|---|
| `int` | The current navigation mode. Value is one of the following: - `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_STANDARD` - `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_LIST` - `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_TABS` |

### getSelectedNavigationIndex

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getSelectedNavigationIndex ()
```

<br />

**This method was deprecated in API level 21.**   

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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract ActionBar.Tab getSelectedTab ()
```

<br />

**This method was deprecated in API level 21.**   

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 ||
|---|---|
| `https://developer.android.com/reference/android/app/ActionBar.Tab` | The currently selected tab or null <br /> |

### getSubtitle

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract CharSequence getSubtitle ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The current ActionBar subtitle or null. <br /> |

### getTabAt

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

<br />

**This method was deprecated in API level 21.**   

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 ||
|---|---|
| `https://developer.android.com/reference/android/app/ActionBar.Tab` | <br /> |

### getTabCount

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getTabCount ()
```

<br />

**This method was deprecated in API level 21.**   

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 [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Context getThemedContext ()
```

Returns a `https://developer.android.com/reference/android/content/Context` 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 ||
|---|---|
| `https://developer.android.com/reference/android/content/Context` | A themed Context for creating views <br /> |

### getTitle

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract CharSequence getTitle ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The current ActionBar title or null. <br /> |

### hide

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void hide ()
```

Hide the ActionBar if it is currently showing. If the window hosting the ActionBar does not have the feature `https://developer.android.com/reference/android/view/Window#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 `https://developer.android.com/reference/android/view/View#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 [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isHideOnContentScrollEnabled ()
```

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

<br />

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

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setHideOnContentScrollEnabled(boolean)`

### isShowing

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract boolean isShowing ()
```

<br />

<br />

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

### newTab

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract ActionBar.Tab newTab ()
```

<br />

**This method was deprecated in API level 21.**   

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 `https://developer.android.com/reference/android/app/ActionBar.Tab`. This tab will not be included in the action bar until it is added.

Very often tabs will be used to switch between `https://developer.android.com/reference/android/app/Fragment` objects. Here is a typical implementation of such tabs:

```
import android.app.ActionBar;
import android.app.ActionBar.Tab;
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.widget.Toast;

/**
 * This demonstrates the use of action bar tabs and how they interact
 * with other action bar features.
 */
public class FragmentTabs extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        final ActionBar bar = getActionBar();
        bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
        bar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);

        bar.addTab(bar.newTab()
                .setText("Simple")
                .setTabListener(new TabListener<FragmentStack.CountingFragment>(
                        this, "simple", FragmentStack.CountingFragment.class)));
        bar.addTab(bar.newTab()
                .setText("Contacts")
                .setTabListener(new TabListener<LoaderCursor.CursorLoaderListFragment>(
                        this, "contacts", LoaderCursor.CursorLoaderListFragment.class)));
        bar.addTab(bar.newTab()
                .setText("Apps")
                .setTabListener(new TabListener<LoaderCustom.AppListFragment>(
                        this, "apps", LoaderCustom.AppListFragment.class)));
        bar.addTab(bar.newTab()
                .setText("Throttle")
                .setTabListener(new TabListener<LoaderThrottle.ThrottledLoaderListFragment>(
                        this, "throttle", LoaderThrottle.ThrottledLoaderListFragment.class)));

        if (savedInstanceState != null) {
            bar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0));
        }
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putInt("tab", getActionBar().getSelectedNavigationIndex());
    }

    public static class TabListener<T extends Fragment> implements ActionBar.TabListener {
        private final Activity mActivity;
        private final String mTag;
        private final Class<T> mClass;
        private final Bundle mArgs;
        private Fragment mFragment;

        public TabListener(Activity activity, String tag, Class<T> clz) {
            this(activity, tag, clz, null);
        }

        public TabListener(Activity activity, String tag, Class<T> clz, Bundle args) {
            mActivity = activity;
            mTag = tag;
            mClass = clz;
            mArgs = args;

            // Check to see if we already have a fragment for this tab, probably
            // from a previously saved state.  If so, deactivate it, because our
            // initial state is that a tab isn't shown.
            mFragment = mActivity.getFragmentManager().findFragmentByTag(mTag);
            if (mFragment != null && !mFragment.isDetached()) {
                FragmentTransaction ft = mActivity.getFragmentManager().beginTransaction();
                ft.detach(mFragment);
                ft.commit();
            }
        }

        public void onTabSelected(Tab tab, FragmentTransaction ft) {
            if (mFragment == null) {
                mFragment = Fragment.instantiate(mActivity, mClass.getName(), mArgs);
                ft.add(android.R.id.content, mFragment, mTag);
            } else {
                ft.attach(mFragment);
            }
        }

        public void onTabUnselected(Tab tab, FragmentTransaction ft) {
            if (mFragment != null) {
                ft.detach(mFragment);
            }
        }

        public void onTabReselected(Tab tab, FragmentTransaction ft) {
            Toast.makeText(mActivity, "Reselected!", Toast.LENGTH_SHORT).show();
        }
    }
}
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/ActionBar.Tab` | A new Tab <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#addTab(android.app.ActionBar.Tab)`

### removeAllTabs

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void removeAllTabs ()
```

<br />

**This method was deprecated in API level 21.**   

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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

<br />

**This method was deprecated in API level 21.**   

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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void removeTabAt (int position)
```

<br />

**This method was deprecated in API level 21.**   

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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

<br />

**This method was deprecated in API level 21.**   

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 `https://developer.android.com/reference/android/app/ActionBar#setSelectedNavigationItem(int)`.

<br />

<br />

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

### setBackgroundDrawable

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void setBackgroundDrawable (Drawable d)
```

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

<br />

| Parameters ||
|---|---|
| `d` | `Drawable`: Background drawable. This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setStackedBackgroundDrawable(android.graphics.drawable.Drawable)`
- `https://developer.android.com/reference/android/app/ActionBar#setSplitBackgroundDrawable(android.graphics.drawable.Drawable)`

### setCustomView

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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 `https://developer.android.com/reference/android/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:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

### setCustomView

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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 `https://developer.android.com/reference/android/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:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

### setDisplayHomeAsUpEnabled

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

### setDisplayOptions

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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 `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int)`.

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

<br />

| Parameters ||
|---|---|
| `options` | `int`: A combination of the bits defined by the DISPLAY_ constants defined in ActionBar. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_USE_LOGO` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_HOME` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_HOME_AS_UP` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_TITLE` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_CUSTOM` |
| `mask` | `int`: A bit mask declaring which display options should be changed. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_USE_LOGO` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_HOME` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_HOME_AS_UP` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_TITLE` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_CUSTOM` |

### setDisplayOptions

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void setDisplayOptions (int options)
```

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

<br />

| Parameters ||
|---|---|
| `options` | `int`: A combination of the bits defined by the DISPLAY_ constants defined in ActionBar. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_USE_LOGO` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_HOME` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_HOME_AS_UP` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_TITLE` - `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_CUSTOM` |

### setDisplayShowCustomEnabled

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

### setDisplayShowHomeEnabled

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

### setDisplayShowTitleEnabled

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

### setDisplayUseLogoEnabled

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

### setElevation

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 `https://developer.android.com/reference/android/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 [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 `https://developer.android.com/reference/android/view/View#setNestedScrollingEnabled(boolean)` view's content. The action bar must be in `https://developer.android.com/reference/android/view/Window#FEATURE_ACTION_BAR_OVERLAY` to enable hiding on content scroll.

When partially scrolled off screen the action bar is considered `https://developer.android.com/reference/android/app/ActionBar#hide()`. A call to `https://developer.android.com/reference/android/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 [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 `https://developer.android.com/reference/android/app/ActionBar#setDisplayHomeAsUpEnabled(boolean)`.) Examples of this are, "Navigate Home" or "Navigate Up" depending on the `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_HOME_AS_UP` display option. If you have changed the home-as-up indicator using `https://developer.android.com/reference/android/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:**

- `https://developer.android.com/reference/android/app/ActionBar#setHomeAsUpIndicator(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setHomeAsUpIndicator(android.graphics.drawable.Drawable)`

### setHomeActionContentDescription

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 `https://developer.android.com/reference/android/app/ActionBar#setDisplayHomeAsUpEnabled(boolean)`.) Examples of this are, "Navigate Home" or "Navigate Up" depending on the `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_HOME_AS_UP` display option. If you have changed the home-as-up indicator using `https://developer.android.com/reference/android/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:**

- `https://developer.android.com/reference/android/app/ActionBar#setHomeAsUpIndicator(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setHomeAsUpIndicator(android.graphics.drawable.Drawable)`

### setHomeAsUpIndicator

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

Set an alternate drawable to display next to the icon/logo/title when `https://developer.android.com/reference/android/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 `https://developer.android.com/reference/android/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:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayHomeAsUpEnabled(boolean)`
- `https://developer.android.com/reference/android/app/ActionBar#setHomeActionContentDescription(int)`

### setHomeAsUpIndicator

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

Set an alternate drawable to display next to the icon/logo/title when `https://developer.android.com/reference/android/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 `https://developer.android.com/reference/android/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:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayHomeAsUpEnabled(boolean)`
- `https://developer.android.com/reference/android/app/ActionBar#setHomeActionContentDescription(int)`

### setHomeButtonEnabled

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 systemwide 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 `https://developer.android.com/reference/android/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 [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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 `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_USE_LOGO`.

<br />

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

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayUseLogoEnabled(boolean)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayShowHomeEnabled(boolean)`

### setIcon

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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 `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_USE_LOGO`.

<br />

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

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayUseLogoEnabled(boolean)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayShowHomeEnabled(boolean)`

### setListNavigationCallbacks

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

<br />

**This method was deprecated in API level 21.**   

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 [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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 `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_USE_LOGO`.

<br />

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

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayUseLogoEnabled(boolean)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayShowHomeEnabled(boolean)`

### setLogo

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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 `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_USE_LOGO`.

<br />

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

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setDisplayUseLogoEnabled(boolean)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayShowHomeEnabled(boolean)`

### setNavigationMode

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void setNavigationMode (int mode)
```

<br />

**This method was deprecated in API level 21.**   

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. Value is one of the following: - `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_STANDARD` - `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_LIST` - `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_TABS` |

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_STANDARD`
- `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_LIST`
- `https://developer.android.com/reference/android/app/ActionBar#NAVIGATION_MODE_TABS`

### setSelectedNavigationItem

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void setSelectedNavigationItem (int position)
```

<br />

**This method was deprecated in API level 21.**   

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 [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 `https://developer.android.com/reference/android/R.attr#uiOptions`

<br />

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

### setStackedBackgroundDrawable

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void setSubtitle (CharSequence subtitle)
```

Set the action bar's subtitle. This will only be displayed if `https://developer.android.com/reference/android/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:**

- `https://developer.android.com/reference/android/app/ActionBar#setSubtitle(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

### setSubtitle

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void setSubtitle (int resId)
```

Set the action bar's subtitle. This will only be displayed if `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_TITLE` is set.

<br />

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

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setSubtitle(java.lang.CharSequence)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

### setTitle

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void setTitle (CharSequence title)
```

Set the action bar's title. This will only be displayed if `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_TITLE` is set.

<br />

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

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setTitle(int)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

### setTitle

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void setTitle (int resId)
```

Set the action bar's title. This will only be displayed if `https://developer.android.com/reference/android/app/ActionBar#DISPLAY_SHOW_TITLE` is set.

<br />

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

**See also:**

- `https://developer.android.com/reference/android/app/ActionBar#setTitle(java.lang.CharSequence)`
- `https://developer.android.com/reference/android/app/ActionBar#setDisplayOptions(int,%20int)`

### show

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void show ()
```

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

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

<br />