ContextualToolbarMenuItem

Types

Link copied to clipboard
Possible positions for toolbar menu items.
Link copied to clipboard
Possible positions for submenu indicator (in those views that have it).

Properties

Link copied to clipboard
Menu item that will be selected by default (used with items that have a submenu, items that don't will just use their instance here).
Link copied to clipboard
Item's icon that will be tinted with the iconColor or iconColorActivated depending if selected or not.
Link copied to clipboard
Tint color of the icon for unselected state.
Link copied to clipboard
Tint color of the icon for selected state.
Link copied to clipboard
If true, the item can be selected.
Link copied to clipboard
Keeps track whether the toolbar menu item is selected or not.
Link copied to clipboard
Indicates whether this menu item is first from the end and is a text
Link copied to clipboard
Position at which the item will be placed in the toolbar, END by default.
Link copied to clipboard
Long-pressing menu items with submenus opens other items in the toolbar for display.
Link copied to clipboard
Menu item title.
Link copied to clipboard
Currently used only in the AnnotationCreationToolbar.

Functions

Link copied to clipboard
Used to allow parent to notify child items of it's new position so the submenu indicator arrow can be placed correctly.
Link copied to clipboard
Creates a contextual toolbar menu group item with the provided properties.
Link copied to clipboard
open fun createSingleItem(@NonNull context: Context, @IdRes id: Int, @NonNull icon: Drawable, @NonNull title: String, @ColorInt iconColor: Int, @ColorInt iconColorActivated: Int, @NonNull position: ContextualToolbarMenuItem.Position, isSelectable: Boolean): ContextualToolbarMenuItem
Creates a contextual toolbar menu single item with the provided properties.
Link copied to clipboard
Creates a contextual toolbar menu single ite, with the provided properties.
Link copied to clipboard
open fun hasSubmenu(): Boolean
Returns true if the menu item has a submenu.
Link copied to clipboard
Link copied to clipboard
open fun onLayoutChange(view: View, i: Int, i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int)
Link copied to clipboard
open fun onLongClick(v: View): Boolean
Called when a view has been clicked and held.
Link copied to clipboard
open fun setCloseSubmenuOnItemClick(shouldCloseSubmenuOnItemClick: Boolean)
Sets if the submenu should be hidden when any item in the submenu is clicked.
Link copied to clipboard
open fun setDisplayOutsideOfSubmenuIfPossible(displayOutsideOfSubmenuIfPossible: Boolean)
Sets to display menu item as separate item outside of submenu if there's room in the toolbar.
Link copied to clipboard
open fun setEnabled(enabled: Boolean)
Sets the enabled state of this view.
Link copied to clipboard
open fun setOpenSubmenuOnClick(openSubmenuOnClick: Boolean)
Sets if the submenu should be opened after clicking on the menu item.
Link copied to clipboard
open fun setSubMenuItems(@Nullable subMenuItems: List<ContextualToolbarMenuItem>, @Nullable defaultSelectedMenuItem: ContextualToolbarMenuItem)
Sets the submenu items to the menu item and a default selected item.
Link copied to clipboard
open fun setTintingEnabled(useTint: Boolean)
Sets whether the icon should be tinted in iconColor or left as originally provided.
Link copied to clipboard
Indicates whether the submenu should be closed after clicking on its items.
Link copied to clipboard
Check whether this item can be expanded from submenu if there's room in the toolbar.
Link copied to clipboard
Indicates whether the submenu should be opened after clicking on the menu item.
Link copied to clipboard
open fun showColorIndicatorCircle(@ColorInt color: Int, sizeValue: Float)