#鸿蒙学习大百科#如何实现button里面放入图文内容?

如何实现button里面放入图文内容?

HarmonyOS
2024-10-25 09:38:15
浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
朝花惜拾丶
@Entry
@Component
struct Index {
  build() {
    Column() {
      Button({ type: ButtonType.Normal, stateEffect: true }) {
        Row(){
          Image($r("app.media.icon01"))
            .width(30)
            .height(30)
          Text("播放")
        }
      }
      .borderRadius(8)
      .backgroundColor(0x317aff)
      .width(90)
      .height(40)
    }
    .width('100%')
    .height('100%')
    .justifyContent(FlexAlign.Center)
  }
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
分享
微博
QQ
微信
回复
2024-10-25 15:56:46


相关问题
#鸿蒙学习大百科#如何实现ui优化?
1023浏览 • 1回复 待解决