OverflowLinearLayout

Provides an implementation of an overflow linear layout.

The OverflowLinearLayout will automatically hide/show its children depending on the current available screen space and/or the max size of its parent layout. If there is not enough space to show all children, the ones that do not fit will be put in an overflow menu, and an overflow button will be automatically added as the last child of the layout.

Note: if you'd like to hide/show children independently from this layout's decisions, you'll need to add/remove the desired view(s), instead of changing their visibility, as the OverflowLinearLayout will determine the final visibility value of its children.

The OverflowLinearLayout is commonly used with the and the .

Constructors

Link copied to clipboard
constructor(@NonNull context: Context)
constructor(@NonNull context: Context, @Nullable attributeSet: AttributeSet)
constructor(@NonNull context: Context, @Nullable attributeSet: AttributeSet, defStyleAttr: Int)

Types

Link copied to clipboard

Functions

Link copied to clipboard
Returns the icon shown for the overflow button, if present.
Link copied to clipboard
Returns the current set of overflowed views.
Link copied to clipboard
open fun isOverflowed(): Boolean
Whether the OverflowLinearLayout currently has items overflowed.
Link copied to clipboard
Sets the icon to show for the overflow button.
Link copied to clipboard
open fun setOverflowButtonIconResource(@DrawableRes iconResourceId: Int)
Sets the icon to show for the overflow button.