RemoteIcon

Functions summary

Unit
@RemoteComposable
@Composable
RemoteIcon(
    imageVector: RemoteImageVector,
    contentDescription: RemoteString?,
    modifier: RemoteModifier,
    tint: RemoteColor
)

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

Functions

@RemoteComposable
@Composable
fun RemoteIcon(
    imageVector: RemoteImageVector,
    contentDescription: RemoteString?,
    modifier: RemoteModifier = RemoteModifier,
    tint: RemoteColor = LocalRemoteContentColor.current
): Unit

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:

import androidx.compose.remote.creation.compose.capture.RemoteImageVector
import androidx.compose.remote.creation.compose.capture.vectorResource
import androidx.wear.compose.remote.material3.RemoteIcon

RemoteIcon(
    modifier = modifier,
    imageVector =
        RemoteImageVector.vectorResource(R.drawable.gs_map_wght500rond100_vd_theme_24),
    contentDescription = null,
)
Parameters
imageVector: RemoteImageVector

the RemoteImageVector to draw inside this icon

contentDescription: RemoteString?

localized text used by accessibility services to describe this icon, or null if the icon is purely decorative and has no accessibility description

modifier: RemoteModifier = RemoteModifier

the RemoteModifier applied to this icon

tint: RemoteColor = LocalRemoteContentColor.current

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