分享一个伟大的鸿蒙组件:万能加载动画_harmony加载动画

本文介绍了鸿蒙系统中一个万能加载动画的使用,包括加载、提示信息显示等功能。提供了代码示例,并分享了鸿蒙开发的学习资源,包括视频教程、白皮书和实战手册等,覆盖了ArkTS、ArkUI、分布式应用开发等多个核心知识点,旨在帮助开发者快速掌握鸿蒙开发技术。
摘要由CSDN通过智能技术生成

show:false,
mode:HUDMode.loading,
string:‘loading’
}

build() {
Stack(){
Row() {
Flex({direction:FlexDirection.Column,justifyContent:FlexAlign.End,alignItems:ItemAlign.Center}) {
Text(this.message)
.fontSize(40)
.fontWeight(FontWeight.Bold)

Button(“loading”)
.margin({top:100})
.onClick(()=>{
this.hudItem.mode = HUDMode.loading
this.hudItem.string = “”
this.hudItem.show = true
})
Button(“string”)
.margin({top:20})
.onClick(()=>{
this.hudItem.mode = HUDMode.string
this.hudItem.string = “This is a tip”
this.hudItem.show = true

})

Button(“success”)
.margin({top:20})
.onClick(()=>{
this.hudItem.mode = HUDMode.success
this.hudItem.string = “success”
this.hudItem.show = true
})
Button(“error”)
.margin({top:20})
.onClick(()=>{
this.hudItem.mode = HUDMode.error
this.hudItem.string = “error”
this.hudItem.show = true

})
Button(“dismiss”)
.margin({top:20})
.onClick(()=>{
this.hudItem.show = false
})
}
.width(‘100%’)
}

  • 4
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值