ContextualToolbarMenuBar

This view is a component of contextual toolbar. It is a bar holding ContextualToolbarMenuItems. If the item has a submenu, the contextual toolbar will display those items in a separate ContextualToolbarMenuBar below the main one.

Constructors

Link copied to clipboard
constructor(context: Context)
constructor(context: Context, attrs: AttributeSet)
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int)

Types

Link copied to clipboard
Possible positions for toolbar menu items.

Properties

Link copied to clipboard
corner radius of the toolbar in pixels
Link copied to clipboard
Margin between menu items.
Link copied to clipboard
Width (if vertical) or height (if horizontal) of the toolbar, includes item padding
Link copied to clipboard
Padding on the sides of the menu bar (all 4 sides
Link copied to clipboard
Padding to be used for a text item at the very end of the toolbar
Link copied to clipboard
Height/width of the contextual toolbar items in dps.
Link copied to clipboard
The size of a toolbar row in pixels (used for layout calculations).

Functions

Link copied to clipboard
open fun estimateItemCapacity(context: Context, availableSpaceInPx: Int): Int
Estimates the number of menu items that can fit in the available space.
Link copied to clipboard
Returns a copy of currently set menu items.
Link copied to clipboard
open fun hideMenuItems(animate: Boolean): Completable
Hides all menu items in the toolbar with an optional fade-out animation.
Link copied to clipboard
open fun onTouchEvent(event: MotionEvent): Boolean
Handles touch events on the menu bar.
Link copied to clipboard
open fun setBackgroundColor(color: Int)
Sets the background color of the menu bar.
Link copied to clipboard
open fun setBorderAndBackgroundColor(borderColor: Int, backgroundColor: Int)
Sets both the border and background colors of the menu bar.
Link copied to clipboard
open fun setBorderColor(color: Int)
Sets the border color of the menu bar.
Link copied to clipboard
open fun setIsSubmenu(isSubmenu: Boolean)
Sets whether this toolbar menu bar is used for displaying submenu or not.
Link copied to clipboard
Sets menu items to the toolbar.
Link copied to clipboard
open fun showMenuItems(animate: Boolean): Completable
Shows all menu items in the toolbar with an optional fade-in animation.