← Back to Foundation
Icon
Component
in
Foundation
. Since 0.1.0-dev15Overview
Code Examples
Video
Icon component that draws imageVector using tint, defaulting to AmbientContentColor.
@param imageVector ImageVector to draw inside this Icon @param modifier optional Modifier for this Icon @param tint tint to be applied to asset. If Color.Unspecified is provided, then no tint is applied
Overloads
Icon
@Deprecated(
"Icon has been moved into the Material library: androidx.compose.material.Icon",
replaceWith = ReplaceWith("Icon(asset)", "androidx.compose.material.Icon")
)
@Composable
fun Icon(
imageVector: ImageVector,
modifier: Modifier = Modifier,
tint: Color = AmbientContentColor.current
)
Parameters
Name | Description |
---|---|
imageVector | ImageVector to draw inside this Icon |
modifier | optional Modifier for this Icon |
tint | tint to be applied to asset. If Color.Unspecified is provided, then no tint is applie |
Icon
@Deprecated(
"Icon has been moved into the Material library: androidx.compose.material.Icon",
replaceWith = ReplaceWith("Icon(asset)", "androidx.compose.material.Icon")
)
@Composable
fun Icon(
bitmap: ImageBitmap,
modifier: Modifier = Modifier,
tint: Color = AmbientContentColor.current
)
Parameters
Name | Description |
---|---|
bitmap | ImageBitmap to draw inside this Icon |
modifier | optional Modifier for this Icon |
tint | tint to be applied to bitmap. If Color.Unspecified is provided, then no tint is applie |
Icon
@Deprecated(
"Icon has been moved into the Material library: androidx.compose.material.Icon",
replaceWith = ReplaceWith("Icon(asset)", "androidx.compose.material.Icon")
)
@Composable
fun Icon(
painter: Painter,
modifier: Modifier = Modifier,
tint: Color = AmbientContentColor.current
)
Parameters
Name | Description |
---|---|
painter | Painter to draw inside this Icon |
modifier | optional Modifier for this Icon |
tint | tint to be applied to painter. If Color.Unspecified is provided, then no tint is applie |