Dp

interface Dp : ComposableProperties<ERROR CLASS: Symbol not found for androidx.compose.ui.unit.Dp> , Comparable<Dp>

封装Jetpack Compose的 Dp,代表设备无关像素(dp)。

组件API以Dp对象指定其尺寸,例如线条粗细。 通常使用扩展属性(如 10.dp)来创建Dp值。

所有创建和常量访问都应通过 Dimensions.utils 进行。

See also

androidx.compose.ui.unit.Dp

Functions

Link copied to clipboard
abstract operator fun div(other: Int): Dp

Dp 值除以一个整数。

Link copied to clipboard
abstract operator fun minus(other: Dp): Dp

从一个 Dp 值中减去另一个。

Link copied to clipboard
abstract operator fun plus(other: Dp): Dp

将两个 Dp 值相加。

Link copied to clipboard
abstract operator fun times(other: Int): Dp

Dp 值乘以一个整数。