Composable Function

RemoteIcon

Displays a Material Design icon from a RemoteImageVector in a remote layout.

RemoteIcon

Source set: Android
@Composable
public fun RemoteIcon(
    imageVector: RemoteImageVector,
    contentDescription: RemoteString?,
    modifier: RemoteModifier = RemoteModifier,
    tint: RemoteColor = LocalRemoteContentColor.current,
)

Displays a Material Design icon from a RemoteImageVector in a remote layout.

Sizes the icon to imageVector's intrinsic dimensions, or 24.dp when unspecified. Unlike RemoteBasicIcon, which defaults tint to white, RemoteIcon defaults tint to the ambient content color provided by the surrounding Wear Material 3 component (or white if none is provided).

Provide a localized contentDescription (for example, via androidx.compose.ui.res.stringResource) whenever the icon conveys meaning or represents an action. Pass null only for purely decorative icons, which omits the accessibility content description so accessibility services ignore it.

Example of displaying a RemoteIcon:

Parameters

imageVector the RemoteImageVector to draw inside this icon
contentDescription localized text used by accessibility services to describe this icon, or null if the icon is purely decorative and has no accessibility description
modifier the RemoteModifier applied to this icon
tint color applied to imageVector using a color filter with the vector's tint blend mode (androidx.compose.ui.graphics.BlendMode.SrcIn by default, which replaces the icon's RGB colors with tint while preserving alpha rather than multiplying RGBA). Defaults to the current content color
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: