HarmonyOS RelativeContainer中alignRules的bias属性设置无效

HarmonyOS
2024-12-18 16:03:49
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
zbw_apple

参考demo:

@Entry
@Component
struct Index {
  build() {
    Row() {
      RelativeContainer() {
        Row().width(100).height(100)
          .backgroundColor("#FF3333")
          .alignRules({
            top: {anchor: "__container__", align: VerticalAlign.Top},
            bottom : {anchor : "__container__", align : VerticalAlign.Bottom},
            left: {anchor: "__container__", align: HorizontalAlign.Start},
            right : {anchor : "__container__", align: HorizontalAlign.End},
            bias : {vertical : 0.3}
          })
          .id("row1")
      }
      .width(300).height(300)
      .margin({left: 50})
      .border({width:2, color: "#6699FF"})
    }
    .height('100%')
  }
}
分享
微博
QQ
微信
回复
2024-12-18 17:13:07
相关问题
HarmonyOS alignRules属性
907浏览 • 1回复 待解决
HarmonyOS relativeContainer设置guideLine属性
831浏览 • 1回复 待解决
HarmonyOS 组件设置属性无效
1360浏览 • 1回复 待解决
HarmonyOS designWidth设置无效
871浏览 • 1回复 待解决
HarmonyOS 设置margin无效
869浏览 • 1回复 待解决
HarmonyOS 设置 bodercolor 无效
933浏览 • 1回复 待解决
HarmonyOS RelativeContainer宽高设置问题
684浏览 • 1回复 待解决
HarmonyOS Progress设置渐变无效
752浏览 • 1回复 待解决
HarmonyOS bindPopup设置color无效
2181浏览 • 1回复 待解决
HarmonyOS camera设置对焦无效
1826浏览 • 1回复 待解决
HarmonyOS 设置应用图标和名称无效
1029浏览 • 1回复 待解决
HarmonyOS Text内部Span宽度设置无效
943浏览 • 1回复 待解决
HarmonyOS 用域名设置cookie无效
1027浏览 • 1回复 待解决