Types

Link copied to clipboard
Listener for menu items clicks.
Link copied to clipboard
Listener for long clicks on menu items with submenu.

Properties

Link copied to clipboard
The default toolbar height in DP (in horizontal mode, otherwise it's the toolbar width)
Link copied to clipboard
Alpha value of the drag button (if visible).
Link copied to clipboard
A special button used for dragging the toolbar.
Link copied to clipboard
Indicates whether the toolbar is attached to the edge or it's being moved.
Link copied to clipboard
Indicates whether the toolbar can be dragged to a different position.
Link copied to clipboard
Items set on the toolbar.
Link copied to clipboard
Minimal number of spaces left on the toolbar for menu icons.

Functions

Link copied to clipboard
abstract fun bindController(specialModeController: T)
Binds the special mode controller to this toolbar.
Link copied to clipboard
Finds a menu item with specific ID in a list of currently displayed menu items.
Link copied to clipboard
Returns the button used to close the toolbar.
Link copied to clipboard
open fun getParentMenuId(childMenuId: Int): Int
Link copied to clipboard
Gets position of the toolbar.
Link copied to clipboard
open fun getSubmenuSizePx(): Int
Returns the submenu's size in pixels, or the amount of space needed for the submenu.
Link copied to clipboard
Returns the toolbar's size in pixels (height in horizontal mode, width in vertical mode) This method has been deprecated and will be removed in a later version.
Link copied to clipboard
Returns true if this contextual toolbar have currently opened submenu.
Link copied to clipboard
abstract fun isControllerBound(): Boolean
Returns true if the controller is bound.
Link copied to clipboard
Called when onBackPressed() to wire up back press with back and close buttons.
Link copied to clipboard
open fun onClick(v: View)
Link copied to clipboard
open fun onLongClick(v: View): Boolean
Called when a view has been clicked and held.
Link copied to clipboard
A method called once the flat items provided through setMenuItems have been grouped by the MenuItemGroupingRule that can be set with setMenuItemGroupingRule and with DefaultMenuItemGroupingRule as the default one.
Link copied to clipboard
open fun onTouchEvent(event: MotionEvent): Boolean
Link copied to clipboard
Sets the button used to close the toolbar.
Link copied to clipboard
open fun setMenuItemEnabled(@IdRes menuItemId: Int, enabled: Boolean): Boolean
Enables or disables a menu item if that menu item currently exists.
Link copied to clipboard
Sets the rule for grouping menu items.
Link copied to clipboard
open fun setMenuItemVisibility(@IdRes menuItemId: Int, visibility: Int): Boolean
Shows or hides a menu item if that menu item currently exists.
Link copied to clipboard
Sets a listener for menu item clicks on the toolbar.
Link copied to clipboard
Sets a listener for menu item long clicks.
Link copied to clipboard
Sets position of the toolbar.
Link copied to clipboard
Sets the toolbar coordinator controller for communication with .
Link copied to clipboard
open fun setUseBackButtonForCloseWhenHorizontal(useBackButtonForCloseWhenHorizontal: Boolean)
Sets whether to use back button for closing the toolbar when the toolbar is placed horizontally.
Link copied to clipboard
abstract fun unbindController()
Unbinds the bound controller (if any).