ActionBar ActionBar Class

Definition

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

[Android.Runtime.Register("android/app/ActionBar", ApiSince=11, DoNotGenerateAcw=true)]
public abstract class ActionBar : Java.Lang.Object
type ActionBar = class
    inherit Object
Inheritance
ActionBarActionBar
Attributes

Remarks

Android platform documentation

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

ActionBar() ActionBar()
ActionBar(IntPtr, JniHandleOwnership) ActionBar(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
CustomView CustomView
DisplayOptions DisplayOptions
Elevation Elevation

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

Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
Height Height

Retrieve the current height of the ActionBar.

HideOffset HideOffset

Return the current vertical offset of the action bar.

HideOnContentScrollEnabled HideOnContentScrollEnabled

Return whether the action bar is configured to scroll out of sight along with a NestedScrollingEnabled.

IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
IsShowing IsShowing
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
NavigationItemCount NavigationItemCount

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

NavigationMode NavigationMode

Returns the current navigation mode.

PeerReference PeerReference Inherited from Object
SelectedNavigationIndex SelectedNavigationIndex

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

SelectedTab SelectedTab

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

Subtitle Subtitle
SubtitleFormatted SubtitleFormatted

Returns the current ActionBar subtitle in standard mode.

TabCount TabCount

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

ThemedContext ThemedContext

Returns a Context with an appropriate theme for creating views that will appear in the action bar.

ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Title Title
TitleFormatted TitleFormatted

Returns the current ActionBar title in standard mode.

Methods

AddOnMenuVisibilityListener(ActionBar+IOnMenuVisibilityListener) AddOnMenuVisibilityListener(ActionBar+IOnMenuVisibilityListener)

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

AddTab(ActionBar+Tab) AddTab(ActionBar+Tab)

Add a tab for use in tabbed navigation mode.

AddTab(ActionBar+Tab, Boolean) AddTab(ActionBar+Tab, Boolean)

Add a tab for use in tabbed navigation mode.

AddTab(ActionBar+Tab, Int32) AddTab(ActionBar+Tab, Int32)

Add a tab for use in tabbed navigation mode.

AddTab(ActionBar+Tab, Int32, Boolean) AddTab(ActionBar+Tab, Int32, Boolean)

Add a tab for use in tabbed navigation mode.

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
GetTabAt(Int32) GetTabAt(Int32)

Returns the tab at the specified index.

Hide() Hide()

Hide the ActionBar if it is currently showing.

JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
NewTab() NewTab()

Create and return a new ActionBar.Tab.

Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
RemoveAllTabs() RemoveAllTabs()

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

RemoveOnMenuVisibilityListener(ActionBar+IOnMenuVisibilityListener) RemoveOnMenuVisibilityListener(ActionBar+IOnMenuVisibilityListener)

Remove a menu visibility listener.

RemoveTab(ActionBar+Tab) RemoveTab(ActionBar+Tab)

Remove a tab from the action bar.

RemoveTabAt(Int32) RemoveTabAt(Int32)

Remove a tab from the action bar.

SelectTab(ActionBar+Tab) SelectTab(ActionBar+Tab)

Select the specified tab.

SetBackgroundDrawable(Drawable) SetBackgroundDrawable(Drawable)

Set the ActionBar's background.

SetCustomView(Int32) SetCustomView(Int32)

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

SetCustomView(View, ActionBar+LayoutParams) SetCustomView(View, ActionBar+LayoutParams)

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

SetDisplayHomeAsUpEnabled(Boolean) SetDisplayHomeAsUpEnabled(Boolean)

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

SetDisplayOptions(ActionBarDisplayOptions, ActionBarDisplayOptions) SetDisplayOptions(ActionBarDisplayOptions, ActionBarDisplayOptions)

Set selected display options.

SetDisplayShowCustomEnabled(Boolean) SetDisplayShowCustomEnabled(Boolean)

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

SetDisplayShowHomeEnabled(Boolean) SetDisplayShowHomeEnabled(Boolean)

Set whether to include the application home affordance in the action bar.

SetDisplayShowTitleEnabled(Boolean) SetDisplayShowTitleEnabled(Boolean)

Set whether an activity title/subtitle should be displayed.

SetDisplayUseLogoEnabled(Boolean) SetDisplayUseLogoEnabled(Boolean)

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

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetHomeActionContentDescription(ICharSequence) SetHomeActionContentDescription(ICharSequence)

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

SetHomeActionContentDescription(Int32) SetHomeActionContentDescription(Int32)

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

SetHomeActionContentDescription(String) SetHomeActionContentDescription(String)
SetHomeAsUpIndicator(Drawable) SetHomeAsUpIndicator(Drawable)

Android.App.ActionBar.DISPLAY_HOME_AS_UP

SetHomeAsUpIndicator(Int32) SetHomeAsUpIndicator(Int32)

Android.App.ActionBar.DISPLAY_HOME_AS_UP

SetHomeButtonEnabled(Boolean) SetHomeButtonEnabled(Boolean)

Enable or disable the "home" button in the corner of the action bar.

SetIcon(Drawable) SetIcon(Drawable)

Set the icon to display in the 'home' section of the action bar.

SetIcon(Int32) SetIcon(Int32)

Set the icon to display in the 'home' section of the action bar.

SetListNavigationCallbacks(ISpinnerAdapter, ActionBar+IOnNavigationListener) SetListNavigationCallbacks(ISpinnerAdapter, ActionBar+IOnNavigationListener)

Set the adapter and navigation callback for list navigation mode.

SetLogo(Drawable) SetLogo(Drawable)

Set the logo to display in the 'home' section of the action bar.

SetLogo(Int32) SetLogo(Int32)

Set the logo to display in the 'home' section of the action bar.

SetSelectedNavigationItem(Int32) SetSelectedNavigationItem(Int32)

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

SetSplitBackgroundDrawable(Drawable) SetSplitBackgroundDrawable(Drawable)

Set the ActionBar's split background.

SetStackedBackgroundDrawable(Drawable) SetStackedBackgroundDrawable(Drawable)

Set the ActionBar's stacked background.

SetSubtitle(Int32) SetSubtitle(Int32)

Set the action bar's subtitle.

SetTitle(Int32) SetTitle(Int32)

Set the action bar's title.

Show() Show()

Show the ActionBar if it is not currently showing.

ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Events

MenuVisibility MenuVisibility

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to