一、实现小图标效果
在鸿蒙应用开发过程中,如果遇到需要使用小图标的场景时,我们可以使用 SymbolGlyph 这个组件来实现。比如说像下面的这段代码:
build() {
Row(){
SymbolGlyph($r("sys.symbol.trash")).fontSize(24)
Text("删除")
}
}
就可以得到效果:

二、系统小图标代码对照
你可以 点击这里 跳转到鸿蒙官方网站里去查找对应想使用的图标。
这里还有一个鸿蒙官方的图标库:鸿蒙图标库。
Full text complete, Reproduction please indicate the source. Help you? Not as good as one:
Comment(Comments need to be logged in. You are not logged in.)
You need to log in before you can comment.
Comments (0 Comments)
[new] New blog
- Vscode Debug调试 Wails
- 解决 Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../"
- 【JS】手把手教你自定义ESLint规则
- 【powershell】解决数组只有一个元素时转Json变成了对象的问题
- 【GO】基于共享内存的跨进程通信方案
- 【layui】下拉控件dropdown文档
- 【Vue】动态添加组件的两种实现
- 【攻略】Lightbot关卡全解攻略、多图慎入。
- 数独,数独计算器。
- 【微信公众号开发】三、解析微信事件XML数据消息及响应