diff --git a/ArkUI/Proper_Use_Layout/README.md b/ArkUI/Proper_Use_Layout/README.md index 375ce8039a029c91e1a70cee1b8db19d00d563e3..1f12f9d8c4fb7ba9f5209d9a60d867a7afa47301 100644 --- a/ArkUI/Proper_Use_Layout/README.md +++ b/ArkUI/Proper_Use_Layout/README.md @@ -2,10 +2,6 @@ ## 介绍 本例通过Scroll嵌套List,对比List设置宽度和不设置的情况。 -## 预览效果 - -img.png - ## 工程目录 ``` ├──entry/src/main/ets // 代码区 @@ -16,11 +12,15 @@ │ ├──pages │ │ └──Index.ets // 首页 │ └──segment -│ ├──segment1.ets -│ ├──segment2.ets -│ └──segment3.ets +│ ├──segment1.ets // List列表数据 +│ ├──segment2.ets // List不设置宽高 +│ └──segment3.ets // List设置固定高度 └──entry/src/main/resources // 应用资源目录 ``` +## 使用说明 +示例代码包含两个场景: +* Scroll嵌套List,List不设置宽高。 +* Scroll嵌套List,List设置固定宽高。 ## 相关权限 无 diff --git a/ArkUI/Proper_Use_Layout/entry/src/main/module.json5 b/ArkUI/Proper_Use_Layout/entry/src/main/module.json5 index a1cea8b6a4560cee7bda7a2db52f310c035ab6c8..44c5e49d8129f5d5bcc87ee6768d4a007d4877ca 100644 --- a/ArkUI/Proper_Use_Layout/entry/src/main/module.json5 +++ b/ArkUI/Proper_Use_Layout/entry/src/main/module.json5 @@ -6,8 +6,6 @@ "mainElement": "EntryAbility", "deviceTypes": [ "phone", - "tablet", - "2in1" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/ArkUI/Proper_Use_Layout/entry/src/mock/mock-config.json5 b/ArkUI/Proper_Use_Layout/entry/src/mock/mock-config.json5 deleted file mode 100644 index 7a73a41bfdf76d6f793007240d80983a52f15f97..0000000000000000000000000000000000000000 --- a/ArkUI/Proper_Use_Layout/entry/src/mock/mock-config.json5 +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/ArkUI/Proper_Use_Layout/entry/src/ohosTest/ets/test/Ability.test.ets b/ArkUI/Proper_Use_Layout/entry/src/ohosTest/ets/test/Ability.test.ets deleted file mode 100644 index 85c78f67579d6e31b5f5aeea463e216b9b141048..0000000000000000000000000000000000000000 --- a/ArkUI/Proper_Use_Layout/entry/src/ohosTest/ets/test/Ability.test.ets +++ /dev/null @@ -1,35 +0,0 @@ -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function abilityTest() { - describe('ActsAbilityTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }) - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }) - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }) - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }) - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }) - }) -} \ No newline at end of file diff --git a/ArkUI/Proper_Use_Layout/entry/src/ohosTest/ets/test/List.test.ets b/ArkUI/Proper_Use_Layout/entry/src/ohosTest/ets/test/List.test.ets deleted file mode 100644 index 794c7dc4ed66bd98fa3865e07922906e2fcef545..0000000000000000000000000000000000000000 --- a/ArkUI/Proper_Use_Layout/entry/src/ohosTest/ets/test/List.test.ets +++ /dev/null @@ -1,5 +0,0 @@ -import abilityTest from './Ability.test'; - -export default function testsuite() { - abilityTest(); -} \ No newline at end of file diff --git a/ArkUI/Proper_Use_Layout/entry/src/ohosTest/module.json5 b/ArkUI/Proper_Use_Layout/entry/src/ohosTest/module.json5 deleted file mode 100644 index 55725a929993a8a18b3808d41ef037759440488b..0000000000000000000000000000000000000000 --- a/ArkUI/Proper_Use_Layout/entry/src/ohosTest/module.json5 +++ /dev/null @@ -1,13 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "deviceTypes": [ - "phone", - "tablet", - "2in1" - ], - "deliveryWithInstall": true, - "installationFree": false - } -} diff --git a/ArkUI/Proper_Use_Layout/entry/src/test/List.test.ets b/ArkUI/Proper_Use_Layout/entry/src/test/List.test.ets deleted file mode 100644 index bb5b5c3731e283dd507c847560ee59bde477bbc7..0000000000000000000000000000000000000000 --- a/ArkUI/Proper_Use_Layout/entry/src/test/List.test.ets +++ /dev/null @@ -1,5 +0,0 @@ -import localUnitTest from './LocalUnit.test'; - -export default function testsuite() { - localUnitTest(); -} \ No newline at end of file diff --git a/ArkUI/Proper_Use_Layout/entry/src/test/LocalUnit.test.ets b/ArkUI/Proper_Use_Layout/entry/src/test/LocalUnit.test.ets deleted file mode 100644 index 165fc1615ee8618b4cb6a622f144a9a707eee99f..0000000000000000000000000000000000000000 --- a/ArkUI/Proper_Use_Layout/entry/src/test/LocalUnit.test.ets +++ /dev/null @@ -1,33 +0,0 @@ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function localUnitTest() { - describe('localUnitTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }); - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }); - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }); - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }); - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }); - }); -} \ No newline at end of file diff --git a/ArkUI/Proper_Use_Layout/oh-package.json5 b/ArkUI/Proper_Use_Layout/oh-package.json5 index a8aff0c5aff22d78aa26fd19c3861f4320e951ff..f440d114b8a9d9aeadd0e891bba0d0d076e70936 100644 --- a/ArkUI/Proper_Use_Layout/oh-package.json5 +++ b/ArkUI/Proper_Use_Layout/oh-package.json5 @@ -3,8 +3,5 @@ "description": "Please describe the basic information.", "dependencies": { }, - "devDependencies": { - "@ohos/hypium": "1.0.21", - "@ohos/hamock": "1.0.0" - } + "devDependencies": {} } diff --git a/ArkUI/Proper_Use_Layout/screenshots/Screenshot.jpeg b/ArkUI/Proper_Use_Layout/screenshots/Screenshot.jpeg deleted file mode 100644 index 5c4d3548c337cfa452db36ff85aa23a952e0afd7..0000000000000000000000000000000000000000 Binary files a/ArkUI/Proper_Use_Layout/screenshots/Screenshot.jpeg and /dev/null differ diff --git a/NdkQoS/entry/src/main/module.json5 b/NdkQoS/entry/src/main/module.json5 index d8838feb856bb135d089c4aa3fe1973673f48259..700e5f5bef00ae6748a951fbe52f970202962b77 100644 --- a/NdkQoS/entry/src/main/module.json5 +++ b/NdkQoS/entry/src/main/module.json5 @@ -20,8 +20,7 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "default", - "tablet" + "phone" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/NdkQoS/entry/src/main/resources/base/element/string.json b/NdkQoS/entry/src/main/resources/base/element/string.json index f94595515a99e0c828807e243494f57f09251930..bd8483abff2470d80251cb58c30f3cd67f407328 100644 --- a/NdkQoS/entry/src/main/resources/base/element/string.json +++ b/NdkQoS/entry/src/main/resources/base/element/string.json @@ -10,7 +10,7 @@ }, { "name": "EntryAbility_label", - "value": "label" + "value": "QoSSample" } ] } \ No newline at end of file diff --git a/NdkQoS/entry/src/main/resources/en_US/element/string.json b/NdkQoS/entry/src/main/resources/en_US/element/string.json index f94595515a99e0c828807e243494f57f09251930..bd8483abff2470d80251cb58c30f3cd67f407328 100644 --- a/NdkQoS/entry/src/main/resources/en_US/element/string.json +++ b/NdkQoS/entry/src/main/resources/en_US/element/string.json @@ -10,7 +10,7 @@ }, { "name": "EntryAbility_label", - "value": "label" + "value": "QoSSample" } ] } \ No newline at end of file diff --git a/NdkQoS/entry/src/main/resources/zh_CN/element/string.json b/NdkQoS/entry/src/main/resources/zh_CN/element/string.json index 597ecf95e61d7e30367c22fe2f8638008361b044..4eff80e13d1eb8b606bcb6ebcf0508569ea60291 100644 --- a/NdkQoS/entry/src/main/resources/zh_CN/element/string.json +++ b/NdkQoS/entry/src/main/resources/zh_CN/element/string.json @@ -10,7 +10,7 @@ }, { "name": "EntryAbility_label", - "value": "label" + "value": "QoSSample" } ] } \ No newline at end of file diff --git a/PerformanceAnalysis/BptaDelayAnalysis/.gitignore b/PerformanceAnalysis/BptaDelayAnalysis/.gitignore deleted file mode 100644 index d2ff20141ceed86d87c0ea5d99481973005bab2b..0000000000000000000000000000000000000000 --- a/PerformanceAnalysis/BptaDelayAnalysis/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/node_modules -/oh_modules -/local.properties -/.idea -**/build -/.hvigor -.cxx -/.clangd -/.clang-format -/.clang-tidy -**/.test -/.appanalyzer \ No newline at end of file diff --git a/PerformanceAnalysis/BptaDelayAnalysis/README.md b/PerformanceAnalysis/BptaDelayAnalysis/README.md index b81fd8adb97da33f6d8815b2ece84633b312aa0d..1a2cb49f0961a8dfe0c77c8de9a55d841b24fe0c 100644 --- a/PerformanceAnalysis/BptaDelayAnalysis/README.md +++ b/PerformanceAnalysis/BptaDelayAnalysis/README.md @@ -1,11 +1,41 @@ # **点击完成时延分析** + ## 介绍 + 用于模拟点击完成时延分析,通过修改点击后耗时函数,优化点击完成时延。 +## 工程目录 + +``` +├──entry/src/main/ets // 代码区 +│ ├──conponents +│ │ ├──AudioPlayerService.ets // AudioPlayerService类 +│ │ ├──AudioPlayerStatus.ets // AudioStatusUtils类 +│ │ └──ContinueModel.ets // ContinueModel类 +│ ├──entryability +│ │ └──EntryAbility.ets // 程序入口类 +│ ├──entrybackupability +│ │ └──EntryBackupAbility.ets +│ ├──pages +│ │ ├──MainPage.ets // 首页 +│ │ ├──Page1.ets // 动画时延耗时页面(100ms) +│ │ └──Page2.ets // 动画时延耗时页面(1000ms) +│ └──service +│ └──ServiceTask.ets // 耗时函数 +└──entry/src/main/resources // 应用资源目录 +``` + +## 使用说明 + +animationDuration属性有300ms的动画时长,当该属性值设置过长时会导致完成时延变大。 +本示例用于对比animationDuration属性分别设置为100ms与1000ms时,对完成时延的影响。 + ## 相关权限 + 无 ## 约束与限制 + 1. 本示例仅支持标准系统上运行,支持设备:华为手机。 2. HarmonyOS系统:HarmonyOS 5.0.5 Release及以上。 diff --git a/PerformanceAnalysis/BptaDelayAnalysis/entry/.gitignore b/PerformanceAnalysis/BptaDelayAnalysis/entry/.gitignore deleted file mode 100644 index e2713a2779c5a3e0eb879efe6115455592caeea5..0000000000000000000000000000000000000000 --- a/PerformanceAnalysis/BptaDelayAnalysis/entry/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/node_modules -/oh_modules -/.preview -/build -/.cxx -/.test \ No newline at end of file diff --git a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/ets/service/ServiceTask.ets b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/ets/service/ServiceTask.ets index 4b84130eb96cd0b8bfcc9cb435d25b23b589ca77..6a542abcc204abe074411a1777a42c7a268b54e3 100644 --- a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/ets/service/ServiceTask.ets +++ b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/ets/service/ServiceTask.ets @@ -14,7 +14,7 @@ */ // [Start service_task] -export function fun1() { +export function fun1(): void { for (let index = 0; index < 906666; index++) { console.debug('fun1 index:' + index); } diff --git a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/module.json5 b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/module.json5 index a1cea8b6a4560cee7bda7a2db52f310c035ab6c8..44c5e49d8129f5d5bcc87ee6768d4a007d4877ca 100644 --- a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/module.json5 +++ b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/module.json5 @@ -6,8 +6,6 @@ "mainElement": "EntryAbility", "deviceTypes": [ "phone", - "tablet", - "2in1" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/resources/base/element/string.json b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/resources/base/element/string.json index f94595515a99e0c828807e243494f57f09251930..ea806f5b14421eafc63bf40bb3c78a35b1931f21 100644 --- a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/resources/base/element/string.json +++ b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/main/resources/base/element/string.json @@ -10,7 +10,7 @@ }, { "name": "EntryAbility_label", - "value": "label" + "value": "BptaDelayAnalysis" } ] } \ No newline at end of file diff --git a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/mock/mock-config.json5 b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/mock/mock-config.json5 deleted file mode 100644 index 7a73a41bfdf76d6f793007240d80983a52f15f97..0000000000000000000000000000000000000000 --- a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/mock/mock-config.json5 +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/ohosTest/ets/test/Ability.test.ets b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/ohosTest/ets/test/Ability.test.ets deleted file mode 100644 index 85c78f67579d6e31b5f5aeea463e216b9b141048..0000000000000000000000000000000000000000 --- a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/ohosTest/ets/test/Ability.test.ets +++ /dev/null @@ -1,35 +0,0 @@ -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function abilityTest() { - describe('ActsAbilityTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }) - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }) - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }) - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }) - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }) - }) -} \ No newline at end of file diff --git a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/ohosTest/ets/test/List.test.ets b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/ohosTest/ets/test/List.test.ets deleted file mode 100644 index 794c7dc4ed66bd98fa3865e07922906e2fcef545..0000000000000000000000000000000000000000 --- a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/ohosTest/ets/test/List.test.ets +++ /dev/null @@ -1,5 +0,0 @@ -import abilityTest from './Ability.test'; - -export default function testsuite() { - abilityTest(); -} \ No newline at end of file diff --git a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/ohosTest/module.json5 b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/ohosTest/module.json5 deleted file mode 100644 index 55725a929993a8a18b3808d41ef037759440488b..0000000000000000000000000000000000000000 --- a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/ohosTest/module.json5 +++ /dev/null @@ -1,13 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "deviceTypes": [ - "phone", - "tablet", - "2in1" - ], - "deliveryWithInstall": true, - "installationFree": false - } -} diff --git a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/test/List.test.ets b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/test/List.test.ets deleted file mode 100644 index bb5b5c3731e283dd507c847560ee59bde477bbc7..0000000000000000000000000000000000000000 --- a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/test/List.test.ets +++ /dev/null @@ -1,5 +0,0 @@ -import localUnitTest from './LocalUnit.test'; - -export default function testsuite() { - localUnitTest(); -} \ No newline at end of file diff --git a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/test/LocalUnit.test.ets b/PerformanceAnalysis/BptaDelayAnalysis/entry/src/test/LocalUnit.test.ets deleted file mode 100644 index 165fc1615ee8618b4cb6a622f144a9a707eee99f..0000000000000000000000000000000000000000 --- a/PerformanceAnalysis/BptaDelayAnalysis/entry/src/test/LocalUnit.test.ets +++ /dev/null @@ -1,33 +0,0 @@ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function localUnitTest() { - describe('localUnitTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }); - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }); - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }); - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }); - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }); - }); -} \ No newline at end of file