harmony 鸿蒙Theme Configuration

  • 2022-12-13
  • 浏览 (589)

Theme Configuration

To configure the theme for a service widget, use the attribute described below.

Name Description
app_background Background color of the widget.

To configure the theme, create the resources folder at the same level as pages in the widget folder and set the above attribute in the widget/resources/styles/default.json file. For example, to configure the default theme of a widget to light gray:

{
  "style": {
    "app_background": "#dcdcdc"
  }
}

你可能感兴趣的鸿蒙文章

harmony 鸿蒙JS Service Widget UI Components

harmony 鸿蒙Data Types

harmony 鸿蒙button

harmony 鸿蒙calendar

harmony 鸿蒙chart

harmony 鸿蒙clock

harmony 鸿蒙divider

harmony 鸿蒙image

harmony 鸿蒙input

harmony 鸿蒙progress

0  赞