HarmonyOS RelativeContainer 组件咨询

参照文档:

https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-layout-development-relative-layout-V5#子组件位置偏移

“子组件位置偏移”部分,

1.row6 对齐 row3 起始位置

2. row3 偏移了x = -10 ,row6 偏移 x=-15 ,理论上row6要相对row3再偏移-15 才合理

3.实际现在是 row6 是相对于row3 未偏移前位置开始偏移,导致实际所谓相对子组件位置定义模糊

HarmonyOS
2024-09-02 12:37:36
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
put_get

offset是位置属性,先建立组件后偏移,锚点在组件偏移前的位置;margin是尺寸属性,先偏移再建立组件,锚点在组件当前位置。


分享
微博
QQ
微信
回复
2024-09-02 16:02:46
相关问题
RelativeContainer组件auto对齐规则
106浏览 • 1回复 待解决
HarmonyOS textpicker组件的使用咨询
123浏览 • 1回复 待解决
HarmonyOS Scroll 嵌套 RelativeContainer 问题
138浏览 • 1回复 待解决
HarmonyOS RelativeContainer的居中问题
166浏览 • 1回复 待解决
相对布局(RelativeContainer
690浏览 • 1回复 待解决
HarmonyOS 蓝牙API咨询
107浏览 • 1回复 待解决
HarmonyOS卡片问题咨询
82浏览 • 1回复 待解决
HarmonyOS hdc命令咨询
123浏览 • 1回复 待解决
HarmonyOS 录像问题咨询
168浏览 • 1回复 待解决
HarmonyOS 卡片开发咨询
107浏览 • 1回复 待解决
HarmonyOS axios用法咨询
65浏览 • 1回复 待解决
HarmonyOS 系统picker问题咨询
131浏览 • 1回复 待解决
HarmonyOS 崩溃收集问题咨询
135浏览 • 1回复 待解决
HarmonyOS @ohos/protobufjs 使用咨询
57浏览 • 1回复 待解决
HarmonyOS webrtc 库移植咨询
80浏览 • 1回复 待解决
HarmonyOS启动框架AppStartup咨询
148浏览 • 1回复 待解决
HarmonyOS getRawFileContent使用问题咨询
223浏览 • 1回复 待解决