WindowDecorActionBar

WindowDecorActionBar is the ActionBar implementation used by devices of all screen sizes as part of the window decor layout.

Constructors

Link copied to clipboard
constructor(activity: Activity, overlayMode: Boolean)
constructor(dialog: Dialog)
constructor(layout: View)
Only for edit mode.

Types

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Add a listener that will respond to menu visibility change events.
Link copied to clipboard
open fun addTab(tab: ActionBar.Tab)
open fun addTab(tab: ActionBar.Tab, setSelected: Boolean)
open fun addTab(tab: ActionBar.Tab, position: Int)
open fun addTab(tab: ActionBar.Tab, position: Int, setSelected: Boolean)
Add a tab for use in tabbed navigation mode.
Link copied to clipboard
open fun animateToMode(toActionMode: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun doHide(fromSystem: Boolean)
Link copied to clipboard
open fun doShow(fromSystem: Boolean)
Link copied to clipboard
open fun enableContentAnimations(enabled: Boolean)
Link copied to clipboard
open fun getCustomView(): View
Link copied to clipboard
Link copied to clipboard
open fun getElevation(): Float
Get the Z-axis elevation of the action bar in pixels.
Link copied to clipboard
open fun getHeight(): Int
Retrieve the current height of the ActionBar.
Link copied to clipboard
open fun getHideOffset(): Int
Return the current vertical offset of the action bar.
Link copied to clipboard
Get the number of navigation items present in the current navigation mode.
Link copied to clipboard
Returns the current navigation mode.
Link copied to clipboard
Get the position of the selected navigation item in list or tabbed navigation modes.
Link copied to clipboard
Returns the currently selected tab if in tabbed navigation mode and there is at least one tab present.
Link copied to clipboard
Returns the current ActionBar subtitle in standard mode.
Link copied to clipboard
open fun getTabAt(index: Int): ActionBar.Tab
Returns the tab at the specified index.
Link copied to clipboard
open fun getTabCount(): Int
Returns the number of tabs currently registered with the action bar.
Link copied to clipboard
Returns a Context with an appropriate theme for creating views that will appear in the action bar.
Link copied to clipboard
Returns the current ActionBar title in standard mode.
Link copied to clipboard
open fun hasIcon(): Boolean
Link copied to clipboard
open fun hasLogo(): Boolean
Link copied to clipboard
open fun hide()
Hide the ActionBar if it is currently showing.
Link copied to clipboard
open fun hideForSystem()
Link copied to clipboard
Return whether the action bar is configured to scroll out of sight along with a nested scrolling child.
Link copied to clipboard
open fun isShowing(): Boolean
Link copied to clipboard
Returns true if the Title field has been truncated during layout for lack of available space.
Link copied to clipboard
open fun newTab(): ActionBar.Tab
Create and return a new Tab.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onKeyShortcut(keyCode: Int, event: KeyEvent): Boolean
Link copied to clipboard
open fun onWindowVisibilityChanged(visibility: Int)
Link copied to clipboard
open fun removeAllTabs()
Remove all tabs from the action bar and deselect the current tab.
Link copied to clipboard
Remove a menu visibility listener.
Link copied to clipboard
open fun removeTab(tab: ActionBar.Tab)
Remove a tab from the action bar.
Link copied to clipboard
open fun removeTabAt(position: Int)
Remove a tab from the action bar.
Link copied to clipboard
open fun requestFocus(): Boolean
Attempts to move focus to the ActionBar if it does not already contain the focus.
Link copied to clipboard
open fun selectTab(tab: ActionBar.Tab)
Select the specified tab.
Link copied to clipboard
Set the ActionBar's background.
Link copied to clipboard
open fun setCustomView(view: View)
open fun setCustomView(resId: Int)
open fun setCustomView(view: View, layoutParams: ActionBar.LayoutParams)
Set the action bar into custom navigation mode, supplying a view for custom navigation.
Link copied to clipboard
open fun setDisplayHomeAsUpEnabled(showHomeAsUp: Boolean)
Set whether home should be displayed as an "up" affordance.
Link copied to clipboard
open fun setDisplayOptions(options: Int)
Set display options.
open fun setDisplayOptions(options: Int, mask: Int)
Set selected display options.
Link copied to clipboard
open fun setDisplayShowCustomEnabled(showCustom: Boolean)
Set whether a custom view should be displayed, if set.
Link copied to clipboard
Set whether to include the application home affordance in the action bar.
Link copied to clipboard
open fun setDisplayShowTitleEnabled(showTitle: Boolean)
Set whether an activity title/subtitle should be displayed.
Link copied to clipboard
Set whether to display the activity logo rather than the activity icon.
Link copied to clipboard
open fun setElevation(elevation: Float)
Set the Z-axis elevation of the action bar in pixels.
Link copied to clipboard
open fun setHideOffset(offset: Int)
Set the current hide offset of the action bar.
Link copied to clipboard
open fun setHideOnContentScrollEnabled(hideOnContentScroll: Boolean)
Enable hiding the action bar on content scroll.
Link copied to clipboard
Set an alternate description for the Home/Up action, when enabled.
Link copied to clipboard
open fun setHomeAsUpIndicator(indicator: Drawable)
open fun setHomeAsUpIndicator(resId: Int)
Set an alternate drawable to display next to the icon/logo/title when DISPLAY_HOME_AS_UP is enabled.
Link copied to clipboard
open fun setHomeButtonEnabled(enable: Boolean)
Enable or disable the "home" button in the corner of the action bar.
Link copied to clipboard
open fun setIcon(icon: Drawable)
open fun setIcon(resId: Int)
Set the icon to display in the 'home' section of the action bar.
Link copied to clipboard
Set the adapter and navigation callback for list navigation mode.
Link copied to clipboard
open fun setLogo(logo: Drawable)
open fun setLogo(resId: Int)
Set the logo to display in the 'home' section of the action bar.
Link copied to clipboard
open fun setNavigationMode(mode: Int)
Set the current navigation mode.
Link copied to clipboard
open fun setSelectedNavigationItem(position: Int)
Set the selected navigation item in list or tabbed navigation modes.
Link copied to clipboard
Enables or disables animation between show/hide states.
Link copied to clipboard
Set the ActionBar's split background.
Link copied to clipboard
Set the ActionBar's stacked background.
Link copied to clipboard
open fun setSubtitle(resId: Int)
open fun setSubtitle(subtitle: CharSequence)
Set the action bar's subtitle.
Link copied to clipboard
open fun setTitle(resId: Int)
open fun setTitle(title: CharSequence)
Set the action bar's title.
Link copied to clipboard
open fun setWindowTitle(title: CharSequence)
Link copied to clipboard
open fun show()
Show the ActionBar if it is not currently showing.
Link copied to clipboard
open fun showForSystem()
Link copied to clipboard