Name Date Size

..25-Oct-20244 KiB

.gitignoreH A D25-Oct-2024112

AppScope/H25-Oct-20244 KiB

build-profile.json5H A D25-Oct-20241 KiB

entry/H25-Oct-20244 KiB

hvigor/H25-Oct-20244 KiB

hvigorfile.tsH A D25-Oct-2024158

hvigorwH A D25-Oct-20242.1 KiB

hvigorw.batH A D25-Oct-20242 KiB

oh-package.json5H A D25-Oct-2024815

ohosTest.mdH A D25-Oct-20241.2 KiB

README.mdH A D25-Oct-20241,022

README_zh.mdH A D25-Oct-20242.1 KiB

screenshots/devices/H25-Oct-20244 KiB

README.md

1#  Preferences
2
3### Introduction
4
5This sample shows how to alternate between themes using preferences. The display effect is as follows:
6
7![](screenshots/devices/default_en.png)
8
9### Concepts
10
11Preferences: provide capabilities for processing data in the form of key-value (KV) pairs and support lightweight data persistence, modification, and query. In KV pairs, the keys are of the string type, and the values can be of the number, string, Boolean, Array\<number>, Array\<string>, or Array\<boolean> type.
12
13### Required Permissions
14
15N/A.
16
17### Usage
18
191. Touch the switch button on the upper right corner of the title bar, and select the target theme from the screen displayed.
20
212. Exit the app and then access it again. The theme before the last exit is displayed.
22
23### Constraints
24
25- This sample can only be run on standard-system devices.
26
27- This sample is based on the stage model, which is supported from API version 9.
28
29- This sample requires DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100) to compile and run. 
30