← Back to Wear Material Core
Icon
Component
in
Wear Material Core
. Since 1.2.0-rc01Overview
Examples
Community Notes
Icon component that draws a painter using tint. TODO:// Add link to Chip for a clickable icon
@param painter Painter to draw inside this Icon @param contentDescription Text used by accessibility services to describe what this icon represents. This should always be provided unless this icon is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using androidx.compose.ui.res.stringResource or similar @param modifier Optional Modifier for this Icon @param tint Tint to be applied to painter. If Color.Unspecified is provided, then no tint is applied
Overloads
Icon
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@Composable
fun Icon(
painter: Painter,
contentDescription: String?,
modifier: Modifier,
tint: Color
)
Parameters
Name | Description |
---|---|
painter | Painter to draw inside this Icon |
contentDescription | Text used by accessibility services to describe what this icon represents. This should always be provided unless this icon is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using androidx.compose.ui.res.stringResource or similar |
modifier | Optional Modifier for this Icon |
tint | Tint to be applied to painter. If Color.Unspecified is provided, then no tint is applie |
Previous Component← CompactChip
Next ComponentRadioButton →