当前位置: 首页> 娱乐> 八卦 > 里水网站开发_重庆公司名字查重系统_备案查询站长之家_优化服务平台

里水网站开发_重庆公司名字查重系统_备案查询站长之家_优化服务平台

时间:2025/7/13 23:07:02来源:https://blog.csdn.net/mxj588love/article/details/144870623 浏览次数:0次
里水网站开发_重庆公司名字查重系统_备案查询站长之家_优化服务平台

学习目标:

SymboGlyph使用
SymbolSpan使用


学习内容:


@Entry
@Component
struct IconTest {@State isActive: boolean = false;build() {Flex( { direction: FlexDirection.Column, justifyContent: FlexAlign.Start } ) {//SymboGlyph练习Row({ space: 10 }){SymbolGlyph($r('sys.symbol.ohos_folder_badge_plus')).fontSize(30).fontColor([Color.Blue])Text('用SymbolGlyph创建图标').fontSize(20).fontColor(Color.Blue)}.width('100%')Divider().margin({ top: 10 }).width('100%')// SymbolSpan练习Row({ space: 10 }){//文本图标Text(){SymbolSpan($r('sys.symbol.book')).fontSize(30).fontWeight(FontWeight.Bold).renderingStrategy(SymbolRenderingStrategy.MULTIPLE_OPACITY).fontColor([Color.Black, Color.Green, Color.White])}Text('用SymbolSpan创建图标').fontSize(20)}.margin({ top: 10 }).width('100%')Divider().margin({ top: 10 })//图标动画练习Row({ space: 10 }){SymbolGlyph($r('sys.symbol.ohos_wifi')).fontSize(50).symbolEffect(new HierarchicalSymbolEffect(EffectFillStyle.ITERATIVE),this.isActive)Button(this.isActive==false?'播放':'暂停').onClick(()=>{this.isActive = !this.isActive})}.margin({ top: 10 })}.height('100%').width('100%').padding({ left: 20, right: 20 })}
}

学习产出:

在这里插入图片描述

仿照华为音乐列表做的小栗子, 大家可以尝试做一下

在这里插入图片描述

关键字:里水网站开发_重庆公司名字查重系统_备案查询站长之家_优化服务平台

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: