# SetAppFontSize **Repository Path**: llince/SetAppFontSize ## Basic Information - **Project Name**: SetAppFontSize - **Description**: 基于Slider组件和首选项,实现通过拖动滑块调节应用内字体大小的功能。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 5 - **Created**: 2024-11-13 - **Last Updated**: 2024-11-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Setting the App Font Size ### Overview Based on the **Slider** component and **Preferences**, learn to drag the slider to set the app font size. The following figure shows the effect. ![](screenshots/device/SetAppFontSize.en.gif) ### Concepts - Font size setting principle: The **Slider** component is used to obtain the sliding value, and the value is persisted through **Preferences**. The font size on the page is adjusted based on the value. - Preferences: allows an app to process key-value (KV) data, including querying, modifying, and persisting the data. ### Permissions N/A ### How to Use 1. The app contains two pages: Settings and Font Size Setting. 2. There is a Back button in the upper left corner of the Font Size Setting page. 3. You can access the Font Size Setting page by tapping the Font Size Setting option on the Settings page. 4. When you drag the slider on the Font Size Setting page, the text on the Settings page and the Font Size Setting page change accordingly. ### Constraints 1. The sample is only supported on Huawei phones with standard systems. 2. HarmonyOS: HarmonyOS NEXT Developer Beta1 or later. 3. DevEco Studio: DevEco Studio NEXT Developer Beta1 or later. 4. HarmonyOS SDK: HarmonyOS NEXT Developer Beta1 SDK or later.