当前位置:网站首页>Row of openharmony container components
Row of openharmony container components
2022-08-09 14:18:00 【lplj717】
Row: Containers laid out horizontally
Row(value:{space?: Length}) //space: horizontal layout element spacing, the default is 0
Row property:
1, alignItems (alignment format of child components in the vertical direction)
2, justifyContent8+ (set the alignment format of subcomponents in the horizontal direction)

The code above:
@[email protected] ColumnT {build() {Column() {Text('space').fontSize(9).fontColor(0x000000).width('90%')//space: horizontal layout element spacingRow({ space: 5 }) {Text().width('30%').height(30).backgroundColor(0xAFEEEE)Text().width('30%').height(30).backgroundColor(0x00FFFF)}.width('90%').height(80).border({ width: 1 })Text('alignItems').fontSize(9).fontColor(0x000000).width('90%')//alignItems: The alignment format of subcomponents in the vertical direction (properties are: Start, Center, End), default (Center)Row({ space: 5 }) {Text().width('30%').height(30).backgroundColor(0xAFEEEE)Text().width('30%').height(30).backgroundColor(0x00FFFF)}.alignItems(VerticalAlign.Center).width('90%').height(80).border({ width: 1 })Text('justifyContent').fontSize(9).fontColor(0x000000).width('90%')//justifyContent: Set the alignment format of the child component in the horizontal directionRow() { //Note: The space attribute cannot be added here, the justifyContent attribute will be invalid after adding (based on sdk8)Text().width('30%').height(30).backgroundColor(0xAFEEEE)Text().width('30%').height(30).backgroundColor(0x00FFFF)}.width('90%').height(80).border({ width: 1 }).justifyContent(FlexAlign.End)}.width('100%').height('100%')}}边栏推荐
猜你喜欢
随机推荐
开源一夏│别逗,作为程序员你竟还没参与过开源项目?
openharmony容器组件之Row
oracle财务数据权限思考
Jetpack Compose——Image使用Coli加载网络图片(包含GIF、SVG)
Q_04_07 进一步探索
机器学习web服务化实战:一次吐血的服务化之路 (转载非原创)
音视频录入的pts和dts问题
FFMPEG multimedia file processing (deletion and renaming of ffmpeg files)
初中级常见面试题
一篇ngork直接使用
Spark Sql之union
12.cuBLAS开发指南中文版--cuBLAS中的Level-1函数asum()和axpy()
Full GC (Ergonomics)排查分析
pytest 基础认知
Spark Sql之join on and和where
【面试高频题】可逐步优化的链表高频题
企业公众号开通微信支付
响应式pbootcms模板家禽饲养类网站
常用函数
客户端连接rtsp的步骤









