Package-level declarations

Types

Link copied to clipboard
data class Device(val name: String, val screenSizePx: Int, val density: Float, val fontScale: Float = 1.0f, val boldText: Boolean = false, val round: Boolean = true)
Link copied to clipboard
data class ThemeColors(val primary: Color = Color(0xFFAECBFA), val primaryVariant: Color = Color(0xFF8AB4F8), val secondary: Color = Color(0xFFFDE293), val secondaryVariant: Color = Color(0xFF594F33), val background: Color = Color.Black, val surface: Color = Color(0xFF303133), val error: Color = Color(0xFFEE675C), val onPrimary: Color = Color(0xFF303133), val onSecondary: Color = Color(0xFF303133), val onBackground: Color = Color.White, val onSurface: Color = Color.White, val onSurfaceVariant: Color = Color(0xFFDADCE0), val onError: Color = Color(0xFF000000))
Link copied to clipboard
data class ThemeValues(val name: String, val index: Int, val themeColors: ThemeColors)
Link copied to clipboard
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "en")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ar")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "as")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "b+es+419")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "bg")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "bn")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ca")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "cs")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "da")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "de")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "el")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "en-rGB")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "en-rIE")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "es")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "es-rUS")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "et")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "eu")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "fa")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "fi")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "fr")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "fr-rCA")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "gl")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "gu")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "hi")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "hr")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "hu")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "hy")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "in")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "is")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "it")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "iw")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ja")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ka")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "kk")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "km")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "kn")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ko")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ky")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "lt")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "lv")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "mk")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ml")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "mn")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "mr")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ms")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "my")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "nb")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ne")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "nl")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "or")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "pa")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "pl")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "pt-rBR")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "pt-rPT")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ro")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ru")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "si")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "sk")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "sl")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "sq")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "sr")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "sv")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ta")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "te")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "th")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "tr")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "uk")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "ur")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "uz")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "vi")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "zh-rCN")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "zh-rHK")
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Locales", locale = "zh-rTW")
annotation class WearLocalePreview
Link copied to clipboard
@Preview(backgroundColor = 4278190080, showBackground = true)
annotation class WearPreview

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard

Utility to determine the preview mode and set LocalInteractivePreview or LocalStaticPreview. All previews will start out as static, since they are identical to the runtime until the second frame (when LaunchedEffect has run) when it will be set correctly.

Link copied to clipboard
fun RoundPreview(round: Boolean = true, content: @Composable () -> Unit)

Round Preview, typical useful when using previews without explicit round device support such as paparazzi.

Link copied to clipboard
fun <T, R> tileRendererPreviewData(renderer: TileLayoutRenderer<T, R>, tileState: T, resourceState: R): TilePreviewData
Link copied to clipboard
fun WidthConstrainedBox(widths: List<Dp> = listOf(192.dp, 227.dp), comfortableHeight: Dp = 101.dp, content: @Composable () -> Unit)

A repeated preview to allow seeing the same component at multiple widths.