estimateItemCapacity

open fun estimateItemCapacity(context: Context, availableSpaceInPx: Int): Int

Estimates the number of menu items that can fit in the available space.

Return

The estimated number of items that can fit in the available space.

Parameters

context

The context used to access display metrics.

availableSpaceInPx

The available space in pixels (width for horizontal toolbar, height for vertical).