From 955800d603e94e04169d9b68fcc9deee9da889f6 Mon Sep 17 00:00:00 2001 From: rex <1491721419@qq.com> Date: Thu, 16 Oct 2025 20:46:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=B7=A5=E7=A8=8B=E5=8D=95?= =?UTF-8?q?=E7=8B=AC=E4=B8=8B=E8=BD=BD=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AdaptiveCapabilities/README.md | 13 ++++++++++++- ApiUsingStandards/README.md | 13 ++++++++++++- AppAspectProgrammingDesign/README.md | 13 ++++++++++++- AppColdStart/README.md | 13 ++++++++++++- AppDataSecurity/README.md | 13 ++++++++++++- AppDataSecurity/README_EN.md | 11 +++++++++++ AppFreeze/README.md | 13 ++++++++++++- AppPrivacyProtection/README.en.md | 11 +++++++++++ AppPrivacyProtection/README.md | 11 +++++++++++ ArkTS_high_performance_segment/README.md | 13 ++++++++++++- ArkUI/Component_Nesting_Optimization/README_zh.md | 13 ++++++++++++- .../README.md | 13 ++++++++++++- ArkUI/Lazy_Loading_Optimizes_Performance/README.md | 13 ++++++++++++- ArkUI/Proper_Use_Layout/README.md | 13 ++++++++++++- ArkUI/Proper_Use_Layout/README_EN.md | 11 +++++++++++ ArkUI/PureTabsExt/README.md | 11 +++++++++++ ArkUI/StateManagement/README.md | 11 +++++++++++ .../UI_Component_Performance_Optimization/README.md | 13 ++++++++++++- ArkUI/orientationDevelopment/README.md | 13 ++++++++++++- AvoidTimeComsume/README.md | 13 ++++++++++++- AvoidTimeComsume/README_EN.md | 13 +++++++++++-- animation/README.md | 13 ++++++++++++- avscreen-capture-screen-record-master/README.en.md | 13 ++++++++++++- avscreen-capture-screen-record-master/README.md | 13 ++++++++++++- 24 files changed, 281 insertions(+), 19 deletions(-) diff --git a/AdaptiveCapabilities/README.md b/AdaptiveCapabilities/README.md index d56f3fb6..576c2d8a 100644 --- a/AdaptiveCapabilities/README.md +++ b/AdaptiveCapabilities/README.md @@ -146,4 +146,15 @@ entry/src/main/ets 1. 本示例仅支持标准系统上运行,支持设备:华为手机、平板。 2. HarmonyOS系统:HarmonyOS 5.0.5 Release及以上。 3. DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo AdaptiveCapabilities/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/ApiUsingStandards/README.md b/ApiUsingStandards/README.md index 13657f23..a9b2db8e 100644 --- a/ApiUsingStandards/README.md +++ b/ApiUsingStandards/README.md @@ -52,4 +52,15 @@ 3. DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo ApiUsingStandards/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/AppAspectProgrammingDesign/README.md b/AppAspectProgrammingDesign/README.md index 7c20508f..c28c0291 100644 --- a/AppAspectProgrammingDesign/README.md +++ b/AppAspectProgrammingDesign/README.md @@ -48,4 +48,15 @@ 3. DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo AppAspectProgrammingDesign/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/AppColdStart/README.md b/AppColdStart/README.md index 12019e4f..968f2d7c 100644 --- a/AppColdStart/README.md +++ b/AppColdStart/README.md @@ -52,4 +52,15 @@ * 本示例仅支持标准系统上运行,支持设备:华为手机。 * HarmonyOS系统:HarmonyOS 5.0.5 Release及以上。 * DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -* HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +* HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo AppColdStart/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/AppDataSecurity/README.md b/AppDataSecurity/README.md index 09f2972b..53bbecf0 100644 --- a/AppDataSecurity/README.md +++ b/AppDataSecurity/README.md @@ -42,4 +42,15 @@ 3. DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo AppDataSecurity/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/AppDataSecurity/README_EN.md b/AppDataSecurity/README_EN.md index 5c59ed21..29871498 100644 --- a/AppDataSecurity/README_EN.md +++ b/AppDataSecurity/README_EN.md @@ -37,3 +37,14 @@ N/A 3. The DevEco Studio version must be DevEco Studio NEXT Release or later. 4. The HarmonyOS SDK version must be HarmonyOS NEXT Release SDK or later. + +### Download + +To download this project separately, execute the following command: +``` +git init +git config core.sparsecheckout true +echo AppDataSecurity/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` diff --git a/AppFreeze/README.md b/AppFreeze/README.md index b2cdd7c7..4973c6f0 100644 --- a/AppFreeze/README.md +++ b/AppFreeze/README.md @@ -48,4 +48,15 @@ 3. DevEco Studio版本:DevEco Studio NEXT 5.0.5 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS NEXT 5.0.5 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS NEXT 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo AppFreeze/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/AppPrivacyProtection/README.en.md b/AppPrivacyProtection/README.en.md index 67d3a902..5778f26d 100644 --- a/AppPrivacyProtection/README.en.md +++ b/AppPrivacyProtection/README.en.md @@ -52,3 +52,14 @@ N/A 3. The DevEco Studio version must be DevEco Studio 5.0.5 Release or later. 4. The HarmonyOS SDK version must be HarmonyOS 5.0.5 Release SDK or later. + +### Download + +To download this project separately, execute the following command: +``` +git init +git config core.sparsecheckout true +echo AppPrivacyProtection/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` diff --git a/AppPrivacyProtection/README.md b/AppPrivacyProtection/README.md index 00df5c39..8896fc36 100644 --- a/AppPrivacyProtection/README.md +++ b/AppPrivacyProtection/README.md @@ -51,5 +51,16 @@ 4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo AppPrivacyProtection/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` + diff --git a/ArkTS_high_performance_segment/README.md b/ArkTS_high_performance_segment/README.md index a647f474..cdc3aec0 100644 --- a/ArkTS_high_performance_segment/README.md +++ b/ArkTS_high_performance_segment/README.md @@ -12,4 +12,15 @@ * DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -* HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +* HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo ArkTS_high_performance_segment/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/ArkUI/Component_Nesting_Optimization/README_zh.md b/ArkUI/Component_Nesting_Optimization/README_zh.md index f4005d4e..92c50590 100644 --- a/ArkUI/Component_Nesting_Optimization/README_zh.md +++ b/ArkUI/Component_Nesting_Optimization/README_zh.md @@ -37,4 +37,15 @@ 1. 本示例仅支持标准系统上运行,支持设备:华为手机。 2. HarmonyOS系统:HarmonyOS 5.0.5 Release及以上。 3. DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo ArkUI/Component_Nesting_Optimization/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/ArkUI/Component_Redundancy_Refresh_Optimization/README.md b/ArkUI/Component_Redundancy_Refresh_Optimization/README.md index 21e31f4b..828f8116 100644 --- a/ArkUI/Component_Redundancy_Refresh_Optimization/README.md +++ b/ArkUI/Component_Redundancy_Refresh_Optimization/README.md @@ -44,4 +44,15 @@ 3. DevEco Studio版本:DevEco Studio NEXT 5.0.5 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS NEXT 5.0.5 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS NEXT 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo ArkUI/Component_Redundancy_Refresh_Optimization/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/ArkUI/Lazy_Loading_Optimizes_Performance/README.md b/ArkUI/Lazy_Loading_Optimizes_Performance/README.md index 295cbe59..fab9015e 100644 --- a/ArkUI/Lazy_Loading_Optimizes_Performance/README.md +++ b/ArkUI/Lazy_Loading_Optimizes_Performance/README.md @@ -39,4 +39,15 @@ 3. DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo ArkUI/Lazy_Loading_Optimizes_Performance/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/ArkUI/Proper_Use_Layout/README.md b/ArkUI/Proper_Use_Layout/README.md index 1f12f9d8..fce346a5 100644 --- a/ArkUI/Proper_Use_Layout/README.md +++ b/ArkUI/Proper_Use_Layout/README.md @@ -32,4 +32,15 @@ 3. DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo Proper_Use_Layout/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/ArkUI/Proper_Use_Layout/README_EN.md b/ArkUI/Proper_Use_Layout/README_EN.md index 3eda3463..7e48c10f 100644 --- a/ArkUI/Proper_Use_Layout/README_EN.md +++ b/ArkUI/Proper_Use_Layout/README_EN.md @@ -32,3 +32,14 @@ N/A 3. The DevEco Studio version must be DevEco Studio 5.0.5 Release or later. 4. The HarmonyOS SDK version must be HarmonyOS 5.0.5 Release SDK or later. + +### Download + +To download this project separately, execute the following command: +``` +git init +git config core.sparsecheckout true +echo Proper_Use_Layout/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` diff --git a/ArkUI/PureTabsExt/README.md b/ArkUI/PureTabsExt/README.md index e90bf7cf..502a49f2 100644 --- a/ArkUI/PureTabsExt/README.md +++ b/ArkUI/PureTabsExt/README.md @@ -48,3 +48,14 @@ 3. DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 4. HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo PureTabsExt/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` diff --git a/ArkUI/StateManagement/README.md b/ArkUI/StateManagement/README.md index c29ad606..a0277ca7 100644 --- a/ArkUI/StateManagement/README.md +++ b/ArkUI/StateManagement/README.md @@ -21,3 +21,14 @@ 3.DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 4.HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo StateManagement/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` diff --git a/ArkUI/UI_Component_Performance_Optimization/README.md b/ArkUI/UI_Component_Performance_Optimization/README.md index ae353929..8fd82cb4 100644 --- a/ArkUI/UI_Component_Performance_Optimization/README.md +++ b/ArkUI/UI_Component_Performance_Optimization/README.md @@ -40,4 +40,15 @@ * 本示例仅支持标准系统上运行,支持设备:华为手机。 * HarmonyOS系统:HarmonyOS 5.0.5 Release及以上。 * DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -* HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +* HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo UI_Component_Performance_Optimization/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/ArkUI/orientationDevelopment/README.md b/ArkUI/orientationDevelopment/README.md index 8d815134..434fdf88 100644 --- a/ArkUI/orientationDevelopment/README.md +++ b/ArkUI/orientationDevelopment/README.md @@ -39,4 +39,15 @@ entry/src/main/ 3.DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -4.HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +4.HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo orientationDevelopment/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/AvoidTimeComsume/README.md b/AvoidTimeComsume/README.md index f60de103..aa817a60 100644 --- a/AvoidTimeComsume/README.md +++ b/AvoidTimeComsume/README.md @@ -62,4 +62,15 @@ * DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -* HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +* HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo AvoidTimeComsume/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/AvoidTimeComsume/README_EN.md b/AvoidTimeComsume/README_EN.md index 47d120dc..ba90a8b0 100644 --- a/AvoidTimeComsume/README_EN.md +++ b/AvoidTimeComsume/README_EN.md @@ -3,8 +3,6 @@ In application development practices, it is important to effectively prevent the main thread from performing redundant and time-consuming operations. This can effectively reduce the load of the main thread and speed up the UI response. In scenarios where high-frequency callbacks are frequently triggered in a short period of time, time-consuming operations in the APIs need to be avoided to ensure that the main thread is not occupied for a long time. This prevents UI rendering from being blocked to avoid frame freezing or frame loss. This sample describes common redundant operations, common high-frequency callback scenarios, and other main thread optimization methods during development. -## Preview -![](screenshots/output-15_16_3.gif) ## Project Directory ``` ├──entry/src/main/ets // Code @@ -61,3 +59,14 @@ N/A * The DevEco Studio version must be DevEco Studio 5.0.5 Release or later. * The HarmonyOS SDK version must be HarmonyOS 5.0.5 Release SDK or later. + +### Download + +To download this project separately, execute the following command: +``` +git init +git config core.sparsecheckout true +echo AvoidTimeComsume/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` diff --git a/animation/README.md b/animation/README.md index c444975e..d4344031 100644 --- a/animation/README.md +++ b/animation/README.md @@ -38,4 +38,15 @@ * DevEco Studio版本:DevEco Studio 5.0.5 Release及以上。 -* HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 \ No newline at end of file +* HarmonyOS SDK版本:HarmonyOS 5.0.5 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo animation/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/avscreen-capture-screen-record-master/README.en.md b/avscreen-capture-screen-record-master/README.en.md index d8f69d3c..84205147 100644 --- a/avscreen-capture-screen-record-master/README.en.md +++ b/avscreen-capture-screen-record-master/README.en.md @@ -72,4 +72,15 @@ N/A 1. This sample is only supported on Huawei phones running standard systems. 2. The HarmonyOS version must be HarmonyOS 5.1.0 Release or later. 3. The DevEco Studio version must be DevEco Studio 5.1.0 Release or later. -4. The HarmonyOS SDK version must be HarmonyOS 5.1.0 Release SDK or later. \ No newline at end of file +4. The HarmonyOS SDK version must be HarmonyOS 5.1.0 Release SDK or later. + +### Download + +To download this project separately, execute the following command: +``` +git init +git config core.sparsecheckout true +echo avscreen-capture-screen-record-master/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file diff --git a/avscreen-capture-screen-record-master/README.md b/avscreen-capture-screen-record-master/README.md index de281872..404248dc 100644 --- a/avscreen-capture-screen-record-master/README.md +++ b/avscreen-capture-screen-record-master/README.md @@ -71,4 +71,15 @@ 1. 本示例仅支持标准系统上运行,支持设备:华为手机。 2. HarmonyOS系统:HarmonyOS 5.1.0 Release及以上。 3. DevEco Studio版本:DevEco Studio 5.1.0 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS 5.1.0 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS 5.1.0 Release SDK及以上。 + +### 下载 + +如需单独下载本工程,执行如下命令: +``` +git init +git config core.sparsecheckout true +echo avscreen-capture-screen-record-master/ > .git/info/sparse-checkout +git remote add origin https://gitee.com/harmonyos_samples/BestPracticeSnippets.git +git pull origin master +``` \ No newline at end of file -- Gitee