#鸿蒙学习大百科#如何绘制一个胶囊形状的按钮?

如何绘制一个胶囊形状的按钮?

HarmonyOS
2024-10-25 09:35:41
1565浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
被窝终结者
@Entry
@Component
struct Index {
  build() {
    Column() {
      Button('胶囊形状的button', { type: ButtonType.Capsule, stateEffect: true })
        .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.
分享
微博
QQ
微信
回复
2024-10-25 17:37:59


相关问题