Composable Function

RemoteButton

Base level Wear Material3 RemoteButton that offers a single slot to take any content.

RemoteButtonSimpleSample

@Sampled
@Composable
@WearPreviewDevices
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
fun RemoteButtonSimpleSample(modifier: RemoteModifier = RemoteModifier) {
    val tapCount = remember { MutableRemoteInt(0) }
    val countSuffix = " (".rs + tapCount.toRemoteString() + " taps)"

    RemoteButton(valueChange(tapCount, tapCount + 1), modifier = modifier) {
        RemoteText("Tap me!".rs + countSuffix)
    }
}
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: