PaddingValues

interface PaddingValues : ComposableProperties<ERROR CLASS: Symbol not found for androidx.compose.foundation.layout.PaddingValues>

描述应用于组件内容边缘的内边距(Padding)。

内边距是在内容测量之前应用的额外空间,并且具有优先权; 内容本身只能在减去内边距后剩余的空间内进行布局。

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
abstract fun getBottom(): Dp

获取底部边缘的内边距。

Link copied to clipboard
abstract fun getEnd(): Dp

获取结束边缘的内边距。 在 LTR(从左到右)布局中,这是指右边距;在 RTL(从右到左)布局中,这是指左边距。

Link copied to clipboard
abstract fun getStart(): Dp

获取起始边缘的内边距。 在 LTR(从左到右)布局中,这是指左边距;在 RTL(从右到左)布局中,这是指右边距。

Link copied to clipboard
abstract fun getTop(): Dp

获取顶部边缘的内边距。

Link copied to clipboard
abstract fun setAll(all: (Dimensions) -> Dp)

为所有四个边缘(起始、顶部、结束、底部)设置相同的内边距值。

Link copied to clipboard
abstract fun setBottom(bottom: (Dimensions) -> Dp)

设置底部边缘的内边距。

Link copied to clipboard
abstract fun setEnd(end: (Dimensions) -> Dp)

设置结束边缘的内边距。

Link copied to clipboard
abstract fun setStart(start: (Dimensions) -> Dp)

设置起始边缘的内边距。

Link copied to clipboard
abstract fun setTop(top: (Dimensions) -> Dp)

设置顶部边缘的内边距。