Checkable Item
Adds a checkable item to the tray menu. This follows Compose's idiomatic pattern for stateful components.
Parameters
The text label for the checkable menu item.
The current checked state of the item.
A lambda function called when the user toggles the item. The new checked state is passed as a parameter.
Determines if the checkable item is enabled. Defaults to true.
Adds a checkable item to the tray menu with a Composable icon.
Parameters
The text label for the checkable menu item.
A Composable function that defines the icon.
Properties for rendering the icon. Defaults to 16x16 for menu items.
The current checked state of the item.
A lambda function called when the user toggles the item.
Determines if the checkable item is enabled. Defaults to true.
Adds a checkable item to the tray menu with an ImageVector icon.
Parameters
The text label for the checkable menu item.
The ImageVector to display as icon.
Optional tint color for the icon. If null, adapts to menu theme.
Properties for rendering the icon. Defaults to 16x16 for menu items.
The current checked state of the item.
A lambda function called when the user toggles the item.
Determines if the checkable item is enabled. Defaults to true.
Adds a checkable item to the tray menu with a Painter icon.
Parameters
The text label for the checkable menu item.
The Painter to display as icon.
Properties for rendering the icon. Defaults to 16x16 for menu items.
The current checked state of the item.
A lambda function called when the user toggles the item.
Determines if the checkable item is enabled. Defaults to true.
Adds a checkable item to the tray menu with a DrawableResource icon. This allows calling code like: CheckableItem(label, icon = Res.drawable.icon, checked = ..., ...)
Deprecated
Use CheckableItem with separate checked and onCheckedChange parameters
Replace with
CheckableItem(label, checked, onCheckedChange, isEnabled)Adds a checkable item to the tray menu with the legacy API.