目录

resourcemanager

Overview

The resourcemanager module allows developers to obtain application resources or system resources on the native layer by resource ID or resource name, implementing resource adaptation for multiple languages, devices, and screen densities. Specifically, it includes the following:

- Obtaining basic type resources: obtains basic type resources such as color values (in ARGB format), integers, floating-point numbers, and Boolean values.

- Obtaining string resources: obtains ordinary strings, formatted strings (supporting %d, %s, and %f placeholders), string arrays, and plural strings.

- Obtaining media resources: obtains the raw binary data or Base64 encoding of media resources.

- Resource overriding: dynamically loads and removes overlay resources at runtime to implement theme switching or resource overriding.

This module depends on the rawfile module. You need to first obtain the NativeResourceManager object through the rawfile module.

Since: 12

Files

Name Description
resmgr_common.h

Provides the enum types and struct definitions required by the resourcemanager module.

This header file defines the enums such as error codes, screen orientation, color mode, device type, and screen density, as well as the device configuration struct, providing data type support for the resource acquisition functions in ohresmgr.h.

ohresmgr.h Provides the capability of acquiring resources at the native layer of resource management.