Preset Menu Item Grouping Rule
Menu item grouping rule to be extended by those rules that have predefined (preset) groups.
Inheritors
Functions
Link copied to clipboard
abstract fun getGroupPreset(@IntRange(from = ContextualToolbar.MIN_TOOLBAR_CAPACITY ) capacity: Int, itemsCount: Int): List<MenuItem>
Implementation of this method should return desired preset (structured list of menu items) based on the provided capacity (space left on the toolbar) and the amount of items that needs to be fitted.
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.