#鸿蒙学习大百科#如何设置SymbolGlyph的动效策略及播放触发器?

如何设置SymbolGlyph的动效策略及播放触发器?

HarmonyOS
2024-10-26 09:45:46
1173浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
海底捞天王
@Entry
@Component
struct Index {
  @State triggerValueReplace: number = 0;
  build() {

    Column() {
      Text("弹跳动效")
      SymbolGlyph($r('sys.symbol.ellipsis_message_1'))
        .fontSize(96)
        .fontColor([Color.Gray])
        .symbolEffect(new BounceSymbolEffect(EffectScope.WHOLE, EffectDirection.UP), this.triggerValueReplace)
      Button('trigger').onClick(() => {
        this.triggerValueReplace = this.triggerValueReplace + 1;
      })
    }
    .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.
分享
微博
QQ
微信
回复
2024-10-26 16:34:34


相关问题
#鸿蒙学习大百科#模拟如何抓包?
1139浏览 • 1回复 待解决