Box Alignments
interface BoxAlignments
为 androidx.compose.foundation.layout.Box 提供常用的 Alignment 创建工厂接口。
androidx.compose.foundation.layout.Box 是最常用的容器布局之一,可通过对齐参数控制单个子项在父容器中的摆放位置。 本接口定义了 9 种常用位置组合:
顶部:
TopStart、TopCenter、TopEnd中部:
CenterStart、Center、CenterEnd底部:
BottomStart、BottomCenter、BottomEnd
对齐行为会根据 androidx.compose.ui.unit.LayoutDirection 自动处理左右反转。
See also
androidx. compose. foundation. layout. Box
androidx. compose. ui. Alignment
Functions
Link copied to clipboard
组件位于容器底部居中位置。
Link copied to clipboard
组件位于容器右下角(受布局方向影响)。
Link copied to clipboard
组件位于容器左下角(受布局方向影响)。
Link copied to clipboard
组件位于容器右侧中间(受布局方向影响)。
Link copied to clipboard
组件位于容器左侧中间(受布局方向影响)。
Link copied to clipboard
组件位于容器上方居中位置。
Link copied to clipboard
组件位于容器左上角(受布局方向影响)。