Default Menu Item Grouping Rule
Default grouping rule implementation. Performs collapsing of the menu items if there's not enough room in the toolbar. There will be an item representing 'More items', whose colors can be styled by R.attr#pspdf__contextualToolbarStyle
. When clicked, it will open overflown items in the submenu. On the other hand, this class won't extract items if there's some extra space in the toolbar - that should be the custom implementation if so desired.
Inheritors
Functions
Link copied to clipboard
Indicates whether the group items (that are generated to fit items when not enough space) are selectable or not.
Link copied to clipboard
open fun groupMenuItems(@NonNull flatItems: List<ContextualToolbarMenuItem>, @IntRange(from = ContextualToolbar.MIN_TOOLBAR_CAPACITY ) capacity: Int): List<ContextualToolbarMenuItem>
Performs grouping of the provided list of menu items based on the available toolbar capacity, meaning the max number of items it can fit.