harmony 鸿蒙Configuring Layered Icons

  • 2025-06-12
  • 浏览 (5)

Configuring Layered Icons

If the application icon is a layered icon (including the foreground and background images), you can configure the icon by referring to this topic. For details about the icon specifications, see Icon Deliverables.

Procedure

  1. Place the foreground and background resource files in AppScope\resources\base\media. In this example, the file names of the foreground and background resource files are foreground.png and background.png respectively.
  2. Create an layered_image.json file in the AppScope\resources\base\media directory and configure the foreground and background resource information of the layered icon in the file. json { "layered-image": { "background" : "$media:background", "foreground" : "$media:foreground" } }
  3. Reference the layered icon resource file in the app.json5 configuration file. Example: json { "app": { "icon": "$media:layered_image", // ... } }

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Quick Start

harmony 鸿蒙Creating an Application Clone

harmony 鸿蒙app.json5 Configuration File

harmony 鸿蒙Structure of the app Tag

harmony 鸿蒙Overview of Application Configuration Files in FA Model

harmony 鸿蒙Overview of Application Configuration Files in Stage Model

harmony 鸿蒙Application Installation, Uninstall, and Update

harmony 鸿蒙Application Package Overview

harmony 鸿蒙Application Package Structure in FA Model

harmony 鸿蒙Application Package Structure in Stage Model

0  赞