当前位置:网站首页>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%')}}边栏推荐
猜你喜欢
随机推荐
哈希表卡片
自己做了个nodejs+epxress+mysql的小项目,怎么才能让别人通过互联网访问呢?
openharmony容器组件之Row
目标检测类间不平衡问题
处理JSON,fastjson、json-lib简单使用
pytest 之 fixture的调用
opencv-matchTemplate 之使用场景为大图里面找小图
微服务+微信小程序实现社区服务
缓存和数据库一致性问题
NC7 买卖股票的最好时机(一)
蓝桥历届真题-蛇形填数
FFmpeg长时间无响应的解决方法
客户端连接rtsp的步骤
NC96 判断一个链表是否为回文结构
The sword refers to Offer 56 - II. Number of occurrences of a number in an array II (bit operation)
DCT变换与反变换
从荷兰国旗问题到快排优化升级
微信实现扫码支付(native)
远程控制软件-向日葵
RobotFramework 之 条件判断









