目录

鸿蒙Android4个脚有脚线

目录

鸿蒙Android4个脚有脚线

效果

https://i-blog.csdnimg.cn/direct/44d89c96324741caa6ccc61ea1cec386.png


  min:number=122
  max:number=150




    Row(){
        Stack(){

          // 底
          Text().border({
            width:2,
            color:$r('app.color.yellow')
          })
            .height(this.max).aspectRatio(1)

          // 长
          Text().backgroundColor($r('app.color.white'))
            .height(this.max).width(this.min)

          // 宽
          Text().backgroundColor($r('app.color.white'))
            .height(this.min).width(this.max)

          Text('erweim').backgroundColor(Color.Yellow).width(this.min).aspectRatio(1)


        }
        .alignContent(Alignment.Center)
      }
      .justifyContent(FlexAlign.Center)
      .width('100%')

      .layoutWeight(1)

      Divider().vertical(false).color($r('app.color.grey4')).strokeWidth(1)