WearPreviewSmallRound

@<Error class: unknown class>
annotation WearPreviewSmallRound


WearPreviewSmallRound is a custom preview annotation for displaying Wear composables on small round Wear device (WearDevices.SMALL_ROUND).

import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.wear.compose.material.Button
import androidx.wear.compose.material.ButtonDefaults
import androidx.wear.compose.material.Icon

Button(
    onClick = { /* Do something */ },
    enabled = true,
) {
    Icon(
        painter = painterResource(id = R.drawable.ic_airplanemode_active_24px),
        contentDescription = "airplane",
        modifier =
            Modifier.size(ButtonDefaults.DefaultIconSize)
                .wrapContentSize(align = Alignment.Center),
    )
}
See also
SMALL_ROUND

Summary

Public constructors

Public constructors

WearPreviewSmallRound

WearPreviewSmallRound()