GroupedGridItem

data class GroupedGridItem(val title: String, val icon: ToolkitIcon, val subtitle: String? = null, val iconShape: Shape? = null, val iconContainerColor: Color = Color.Unspecified, val iconContentColor: Color = Color.Unspecified, val enabled: Boolean = true, val onClick: () -> Unit)(source)

One cell of a GroupedGrid: what it shows, how its badge is cut, and what tapping it does.

iconShape, iconContainerColor and iconContentColor are per-cell overrides. Leaving them unset draws the cell with the grid's shared shape and colors, which is what a set of peers such as storage buckets or quick actions wants; setting them lets one cell stand out, for example a category badge cut from a different MaterialShapes silhouette than its neighbours.

Constructors

Link copied to clipboard
constructor(title: String, icon: ToolkitIcon, subtitle: String? = null, iconShape: Shape? = null, iconContainerColor: Color = Color.Unspecified, iconContentColor: Color = Color.Unspecified, enabled: Boolean = true, onClick: () -> Unit)

Properties

Link copied to clipboard

false renders the cell as unavailable and stops it reacting to taps.

Link copied to clipboard

Glyph drawn inside the badge. Any ToolkitIcon source is accepted, animated vectors and bundled Lottie included.

Link copied to clipboard

Badge fill. Color.Unspecified uses the grid's color.

Link copied to clipboard

Glyph tint. Color.Unspecified uses the grid's color.

Link copied to clipboard

Silhouette the badge is cut with, typically MaterialShapes.<name>.toShape(). null uses the grid's shape.

Link copied to clipboard
val onClick: () -> Unit

Invoked when the cell is tapped.

Link copied to clipboard

Supporting line under title, such as a formatted size. null renders a single-line cell, which is what an action grid without a measurement wants.

Link copied to clipboard

Primary line, such as "Installed apps".