HarmonyNext 系统SDK图标资源的使用

HarmonyNext 系统SDK图标资源的使用

资源文件的具体路径为你的sdk路径/default/openharmony/ets/build-tools/ets-loader/sysResource.js

图标名称列表

所有的图标列表如下:

yaml 复制代码
 media: {
     ohos_app_icon: 125829858,
     ohos_ic_back: 125829938,
     ohos_ic_public_ok: 125830038,
     ohos_ic_public_arrow_left: 125830087,
     ohos_ic_public_arrow_right: 125830088,
     ohos_ic_public_arrow_up: 125830089,
     ohos_ic_public_arrow_down: 125830090,
     ohos_ic_public_cut: 125830091,
     ohos_ic_public_copy: 125830092,
     ohos_ic_public_paste: 125830093,
     ohos_ic_public_select_all: 125830094,
     ohos_ic_public_share: 125830095,
     ohos_ic_public_translate_c2e: 125830096,
     ohos_ic_public_search_filled: 125830097,
     ohos_save_button_filled: 125830154,
     ohos_save_button_line: 125830155,
     ohos_ic_bottomsheet_close: 125830167,
     ohos_ic_public_clock: 125830169,
     ohos_ic_public_email: 125830170,
     ohos_ic_public_express: 125830171,
     ohos_ic_public_flight: 125830172,
     ohos_ic_public_location: 125830173,
     ohos_ic_public_phone: 125830174,
     ohos_ic_public_text: 125830175,
     ohos_ic_public_web: 125830176,
     ohos_ic_public_device_matebook: 125830208,
     ohos_ic_public_device_pad: 125830209,
     ohos_ic_public_device_smartscreen: 125830210,
     ohos_ic_public_device_watch: 125830211,
     ohos_ic_public_device_phone: 125830212,
     ohos_ic_eco_hop: 125830213,
     ohos_ic_public_more: 125830217,
     ohos_ic_public_add: 125830229,
     ohos_ic_public_minus: 125830230,
     ohos_ic_public_cast_stream: 125830232,
     ohos_ic_public_cast_mirror: 125830233,
     ohos_ic_public_camera: 125830242,
     ohos_ic_public_cancel: 125830347,
     ohos_ic_public_hang_up: 125830395,
     ohos_ic_public_pause: 125830396,
     ohos_ic_public_play_last: 125830397,
     ohos_ic_public_play_next: 125830398,
     ohos_ic_public_play: 125830399,
     ohos_ic_public_restore: 125830400,
     ohos_ic_public_sound_off: 125830401,
     ohos_ic_public_sound: 125830402,
     ohos_ic_public_video_off: 125830403,
     ohos_ic_public_video: 125830404,
     ohos_ic_public_voice_off: 125830405,
     ohos_ic_public_voice: 125830406,
     ohos_ic_public_albums: 125830650,
     ohos_ic_public_scan: 125830651,
     ohos_ic_public_add_norm_filled: 125830839,
     ohos_ic_public_remove_filled: 125830840,
     ohos_ic_public_edit: 125830841,
     ohos_ic_public_fail: 125830842,
     ohos_ic_public_close: 125830852,
     ohos_ic_compnent_titlebar_back: 125830859,
     ohos_ic_compnent_titlebar_back_filled: 125830860,
     ohos_ic_public_cancel_filled: 125830861,
     ohos_ic_public_drawer_close: 125830862,
     ohos_ic_public_drawer_close_filled: 125830863,
     ohos_ic_public_drawer_open: 125830864,
     ohos_ic_public_drawer_open_filled: 125830865,
     ohos_ic_public_input_cancel: 125830866,
     ohos_ic_normal_white_grid_zip: 125830867,
     ohos_ic_normal_white_grid_xml: 125830868,
     ohos_ic_normal_white_grid_xls: 125830869,
     ohos_ic_normal_white_grid_wma: 125830870,
     ohos_ic_normal_white_grid_wav: 125830871,
     ohos_ic_normal_white_grid_video: 125830872,
     ohos_ic_normal_white_grid_txt: 125830873,
     ohos_ic_normal_white_grid_pdf: 125830874,
     ohos_ic_normal_white_grid_mp3: 125830875,
     ohos_ic_normal_white_grid_image: 125830876,
     ohos_ic_normal_white_grid_html: 125830877,
     ohos_ic_normal_white_grid_folder: 125830878,
     ohos_ic_normal_white_grid_flac: 125830879,
     ohos_ic_normal_white_grid_doc: 125830880,
     ohos_ic_normal_white_grid_compress: 125830881,
     ohos_ic_normal_white_grid_calendar: 125830882,
     ohos_ic_normal_white_grid_audio: 125830883,
     ohos_icon_mask_svg: 125830886,
     ohos_ic_public_remove: 125831084,
     ohos_user_auth_icon_face: 125831150,
     ohos_user_auth_icon_fingerprint: 125831151,
     ohos_ic_public_device_bluetooth_filled: 125831209,
     ohos_ic_public_device_earphone_filled: 125831210,
     ohos_ic_public_device_earpiece_filled: 125831211,
     ohos_ic_public_device_speaker_filled: 125831212,
     ohos_ic_public_device_sound_filled: 125831213,
     ohos_ic_public_device_soundx_filled: 125831214,
     ohos_ic_public_device_smartscreen_filled: 125831215,
     ohos_ic_public_ok_filled: 125831216,
     save_button_picture: 125833494,
     clone_app_badge_1: 125833500,
     clone_app_badge_2: 125833501,
     clone_app_badge_3: 125833502,
     clone_app_badge_4: 125833503,
     clone_app_badge_5: 125833504,
     ic_public_worldclock_filled: 125833519,
     safe_volume_notification_icon: 125834229
 }

使用方法

通过资源路径$r('system.media.xxxxxx')的方式使用系统SDK中自带的icon图标。具体的使用例子如下:

scss 复制代码
 Image($r('sys.media.ohos_ic_public_arrow_up'))
     .width(20)
     .aspectRatio(1)
相关推荐
鸿蒙自习室2 小时前
鸿蒙多线程开发——线程间数据通信对象02
ui·harmonyos·鸿蒙
SuperHeroWu74 小时前
【HarmonyOS】鸿蒙应用接入微博分享
华为·harmonyos·鸿蒙·微博·微博分享·微博sdk集成·sdk集成
zhangjr05757 小时前
【HarmonyOS Next】鸿蒙实用装饰器一览(一)
前端·harmonyos·arkts
诗歌难吟46413 小时前
初识ArkUI
harmonyos
SameX14 小时前
HarmonyOS Next 设备安全特性深度剖析学习
harmonyos
郭梧悠15 小时前
HarmonyOS(57) UI性能优化
ui·性能优化·harmonyos
郝晨妤1 天前
鸿蒙原生应用开发元服务 元服务是什么?和App的关系?(保姆级步骤)
android·ios·华为od·华为·华为云·harmonyos·鸿蒙
Peace*1 天前
HarmonyOs鸿蒙开发实战(16)=>沉浸式效果第一种方案一窗口全屏布局方案
harmonyos·鸿蒙·鸿蒙系统
howard20051 天前
鸿蒙实战:页面跳转传参
harmonyos·跳转·router·传参
威哥爱编程2 天前
异步编程在ArkTS中具体怎么实现?
harmonyos·arkts·harmonyos next