harmony 鸿蒙Intl Development
Intl Development
How resources in AppScope, such as images and text, are referenced?
Applicable to: OpenHarmony SDK 3.2.5.5, stage model of API version 9
Resources are referenced in the $r(‘app.type.name’) format. Where, type indicates the resource type, such as color, string, and media, and name indicates the resource name.
How do I convert the resource type to string?
Applicable to: OpenHarmony SDK3.0, stage model of API version 9
If the resource type is set to string, the qualifier directory can be set as this.context.resourceManager.getStringSync(\$r(‘app.string.test’).id) and can be converted synchronously. The \$r(‘app.string.test’, 2) mode is not supported. For more usage methods, see Resource Manager.
Why should I do if the constants referenced by $ in the form_config.json file does not take effect?
Applicable to: OpenHarmony SDK 3.2.6.5, API9 Stage model
In the form_config.json file, $ cannot be used to reference constants.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Ability Framework Development
harmony 鸿蒙Bundle Management Development
harmony 鸿蒙Network and Connection Development
harmony 鸿蒙Data Management Development
harmony 鸿蒙Development Board Usage
harmony 鸿蒙Device Management Development
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦