RemoteTextSample
@Sampled
@Preview
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteTextSample() {
RemoteText(text = "Hello Remote Compose".rs, color = Color.Blue.rc, fontSize = 20.rsp)
}
RemoteTextStylingSample
@Sampled
@Preview
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteTextStylingSample() {
RemoteText(
text = "Bold & Italic".rs,
fontWeight = RemoteFontWeight.Bold,
fontStyle = RemoteFontStyle.Italic,
)
}
RemoteTextFontFamilySample
@Sampled
@Preview
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteTextFontFamilySample() {
RemoteColumn {
RemoteText(text = "Serif".rs, fontFamily = RemoteFontFamily.Serif)
RemoteText(text = "Sans Serif".rs, fontFamily = RemoteFontFamily.SansSerif)
RemoteText(text = "Monospace".rs, fontFamily = RemoteFontFamily.Monospace)
RemoteText(text = "ExtraBold".rs, fontWeight = RemoteFontWeight.ExtraBold)
RemoteText(
text = "Named Flex Font with Variations".rs,
fontFamily = RemoteFontFamily.Named("device:roboto-flex"),
fontVariationSettings =
RemoteFontVariation.Settings(
RemoteFontVariation.weight(300.rf),
RemoteFontVariation.width(70f.rf),
),
)
}
}