ActionMenu

open class ActionMenu

Bottom sheet menu showing a list of actions. The menu consists of two sections: Fixed menu items and dynamic menu items. You can set menu items by calling setMenuItems which will a list of ActionMenuItem objects independent of their ActionMenuItem.MenuItemType (you set both fixed and dynamic menu items in one call). To show the configured call show.

Inheritors

Constructors

Link copied to clipboard
constructor(@NonNull activity: FragmentActivity)
Creates a new instance and attaches it to the parent activity.

Properties

Link copied to clipboard
open val isShowing: Boolean
Link copied to clipboard

Functions

Link copied to clipboard
Adds new listener for action menu lifecycle and events.
Link copied to clipboard
open fun addMenuItem(@NonNull menuItem: ActionMenuItem)
Add menu item to action menu.
Link copied to clipboard
open fun addMenuItems(@Nullable menuItems: List<ActionMenuItem>)
Add all menu items to action menu.
Link copied to clipboard
Clear all fixed menu items.
Link copied to clipboard
open fun clearMenuItems()
Clear all menu items.
Link copied to clipboard
Clear all standard menu items.
Link copied to clipboard
open fun createActionMenuIcon(@NonNull context: Context, @DrawableRes drawableResId: Int): Drawable
Gets icon from drawable resource styled properly so it can be used in action menu.
Link copied to clipboard
open fun dismiss()
Dismiss action menu if shown.
Link copied to clipboard
open fun onAttach(@NonNull activity: FragmentActivity)
Called when menu is attached to the activity.
Link copied to clipboard
open fun onDetach()
Called when menu is being detached from activity.
Link copied to clipboard
Removes a previously added listener.
Link copied to clipboard
open fun setTitle(@StringRes titleResId: Int)
open fun setTitle(@Nullable dialogTitle: String)
Sets text displayed in dialog title.
Link copied to clipboard
open fun show(): Boolean
Shows action menu.