ActionMenuView
open class ActionMenuView : LinearLayoutCompat
kotlin.Any | ||||
↳ | android.view.View | |||
↳ | android.view.ViewGroup | |||
↳ | androidx.appcompat.widget.LinearLayoutCompat | |||
↳ | androidx.appcompat.widget.ActionMenuView |
ActionMenuView is a presentation of a series of menu options as a View. It provides several top level options as action buttons while spilling remaining options over as items in an overflow menu. This allows applications to present packs of actions inline with specific or repeating content.
Summary
Nested classes | |
---|---|
open | |
abstract |
Interface responsible for receiving menu item click events if the items themselves do not have individual item click listeners. |
Inherited constants | |
---|---|
Public constructors | |
---|---|
<init>(context: Context!, attrs: AttributeSet!) |
Public methods | |
---|---|
open Menu! |
getMenu() Returns the Menu object that this ActionMenuView is currently presenting. |
open Drawable? |
Return the current drawable used as the overflow icon. |
open Unit |
setPopupTheme(resId: Int) Specifies the theme to use when inflating popup menus. |
open Boolean |
Show the overflow items from the associated menu. |
open Unit |
onConfigurationChanged(newConfig: Configuration!) |
open Unit |
setOverflowIcon(icon: Drawable?) Set the icon to use for the overflow button. |
open Unit | |
open Unit |
Dismiss any popups associated with this menu view. |
open ActionMenuView.LayoutParams! |
generateLayoutParams(attrs: AttributeSet!) |
open Unit | |
open Int | |
open Boolean |
Check whether the overflow menu is currently showing. |
open Boolean | |
open Boolean |
Hide the overflow items from the associated menu. |
Protected methods | |
---|---|
open Boolean | |
open Unit | |
open ActionMenuView.LayoutParams! | |
open Unit | |
open ActionMenuView.LayoutParams! |
Inherited functions | |
---|---|
Public constructors
<init>
ActionMenuView(context: Context!)
<init>
ActionMenuView(context: Context!, attrs: AttributeSet!)
Public methods
getMenu
open fun getMenu(): Menu!
Returns the Menu object that this ActionMenuView is currently presenting.
Applications should use this method to obtain the ActionMenuView's Menu object and inflate or add content to it as necessary.
Return | |
---|---|
Menu!: the Menu presented by this view |
getOverflowIcon
open fun getOverflowIcon(): Drawable?
Return the current drawable used as the overflow icon.
Return | |
---|---|
Drawable?: The overflow icon drawable |
setPopupTheme
open fun setPopupTheme(resId: Int): Unit
Specifies the theme to use when inflating popup menus. By default, uses the same theme as the action menu view itself.
Parameters | |
---|---|
resId |
Int: theme used to inflate popup menus |
See Also
showOverflowMenu
open fun showOverflowMenu(): Boolean
Show the overflow items from the associated menu.
Return | |
---|---|
Boolean: true if the menu was able to be shown, false otherwise |
onConfigurationChanged
open fun onConfigurationChanged(newConfig: Configuration!): Unit
setOverflowIcon
open fun setOverflowIcon(icon: Drawable?): Unit
Set the icon to use for the overflow button.
Parameters | |
---|---|
icon |
Drawable?: Drawable to set, may be null to clear the icon |
onDetachedFromWindow
open fun onDetachedFromWindow(): Unit
dismissPopupMenus
open fun dismissPopupMenus(): Unit
Dismiss any popups associated with this menu view.
generateLayoutParams
open fun generateLayoutParams(attrs: AttributeSet!): ActionMenuView.LayoutParams!
setOnMenuItemClickListener
open fun setOnMenuItemClickListener(listener: ActionMenuView.OnMenuItemClickListener!): Unit
getPopupTheme
open fun getPopupTheme(): Int
Return | |
---|---|
Int: resource identifier of the theme used to inflate popup menus, or 0 if menus are inflated against the action menu view theme |
See Also
isOverflowMenuShowing
open fun isOverflowMenuShowing(): Boolean
Check whether the overflow menu is currently showing. This may not reflect a pending show operation in progress.
Return | |
---|---|
Boolean: true if the overflow menu is currently showing |
dispatchPopulateAccessibilityEvent
open fun dispatchPopulateAccessibilityEvent(event: AccessibilityEvent!): Boolean
hideOverflowMenu
open fun hideOverflowMenu(): Boolean
Hide the overflow items from the associated menu.
Return | |
---|---|
Boolean: true if the menu was able to be hidden, false otherwise |
Protected methods
checkLayoutParams
protected open fun checkLayoutParams(p: LayoutParams!): Boolean
onLayout
protected open fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int): Unit
generateLayoutParams
protected open fun generateLayoutParams(p: LayoutParams!): ActionMenuView.LayoutParams!
generateDefaultLayoutParams
protected open fun generateDefaultLayoutParams(): ActionMenuView.LayoutParams!
Interfaces
Classes
- ThemedSpinnerAdapter.Helper
- TooltipCompat
- AppCompatMultiAutoCompleteTextView
- AppCompatAutoCompleteTextView
- PopupMenu
- SearchView
- AppCompatImageButton
- SwitchCompat
- AppCompatEditText
- AppCompatSeekBar
- Toolbar
- Toolbar.LayoutParams
- Toolbar.SavedState
- LinearLayoutCompat
- LinearLayoutCompat.LayoutParams
- AppCompatTextView
- AppCompatCheckedTextView
- AppCompatRatingBar
- AppCompatImageView
- AppCompatRadioButton
- ShareActionProvider
- AppCompatCheckBox
- AppCompatSpinner
- ActionMenuView
- ActionMenuView.LayoutParams
- AppCompatButton
- ListPopupWindow