Package-level declarations

Types

Link copied to clipboard
@Preview(name = "Day mode", device = "id:pixel_7", uiMode = 16, backgroundColor = 4294967295, showBackground = true)
@Preview(name = "Night mode", device = "id:pixel_7", uiMode = 32, backgroundColor = 4278190080, showBackground = true)
@Preview(name = "Samsung S20 (narrow device)", device = "spec:width=945px,height=2400px", uiMode = 16, backgroundColor = 4294967295, showBackground = true)
@Preview(name = "Scaled font", device = "id:pixel_7", uiMode = 16, backgroundColor = 4294967295, showBackground = true, fontScale = 1.5)
annotation class PreviewPhoneBothMode

Creates two previews on a Pixel 7 device for light and dark mode.

Link copied to clipboard
@Preview(name = "Day mode", device = "spec:parent=pixel_tablet,orientation=portrait", uiMode = 16, backgroundColor = 4294967295, showBackground = true)
@Preview(name = "Night mode", device = "spec:parent=pixel_tablet,orientation=portrait", uiMode = 32, backgroundColor = 4278190080, showBackground = true)
@Preview(name = "Scaled font", device = "spec:parent=pixel_tablet,orientation=portrait", uiMode = 16, backgroundColor = 4294967295, showBackground = true, fontScale = 1.5)
annotation class PreviewTabletBothMode

Creates two previews on a Pixel tablet device for light and dark mode.

Functions

Link copied to clipboard
fun PaddingValues.copy(top: Dp = calculateTopPadding(), start: Dp = calculateStartPadding(LayoutDirection.Ltr), end: Dp = calculateEndPadding(LayoutDirection.Ltr), bottom: Dp = calculateBottomPadding()): PaddingValues

Updates the given PaddingValues with the given Dp values and returns updated PaddingValues.

Link copied to clipboard

Converts this Float value from Density-independent Pixels (dp) to Pixels (px).

Converts this Int value from Density-independent Pixels (dp) to Pixels (px).

Link copied to clipboard

Whether the current device is a tablet. Equivalent to sw600dp qualifier in Android.

Link copied to clipboard
infix operator fun PaddingValues.plus(other: PaddingValues): PaddingValues

Adds together the values of the given PaddingValues and returns updated PaddingValues.

operator fun TextUnit.plus(other: TextUnit): TextUnit

Returns the sum of this and the other TextUnit value.

Link copied to clipboard

Converts this Float value from Pixels (px) to Density-independent Pixels (dp).

Converts this Int value from Pixels (px) to Density-independent Pixels (dp).

Link copied to clipboard

Converts this Float value from Pixels (px) to Scale-independent Pixels (sp).

Converts this Int value from Pixels (px) to Scale-independent Pixels (sp).

Link copied to clipboard

Converts this TextUnit value to Density-independent Pixels (dp).

Link copied to clipboard

Converts this Dp value to Pixels (px).

Converts this TextUnit value to Pixels (px).

Link copied to clipboard

Converts this Dp value to Scale-independent Pixels (sp).