diff --git a/FramedRendering/build-profile.json5 b/FramedRendering/build-profile.json5 index 6d93d9cd5af96ec9ec78db4738722a66c9464d7e..b8ef59a125a280b3346be9be493b0705704ba1aa 100644 --- a/FramedRendering/build-profile.json5 +++ b/FramedRendering/build-profile.json5 @@ -4,7 +4,8 @@ { "name": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.5(17)", + "targetSdkVersion": "5.0.5(17)", "runtimeOS": "HarmonyOS", "buildOption": { "strictMode": { diff --git a/FramedRendering/hvigor/hvigor-config.json5 b/FramedRendering/hvigor/hvigor-config.json5 index 06b2783670a348f95533b352c1ceda909a842bbc..5bebc9755447385d82ce4138f54d991b1f85f348 100644 --- a/FramedRendering/hvigor/hvigor-config.json5 +++ b/FramedRendering/hvigor/hvigor-config.json5 @@ -1,5 +1,5 @@ { - "modelVersion": "5.0.0", + "modelVersion": "5.0.5", "dependencies": { }, "execution": { diff --git a/FramedRendering/oh-package.json5 b/FramedRendering/oh-package.json5 index b0fd4f4fd63477187853ae0c2d3e4ebac203c20c..b4040e8431bc3cfb8a7c976128fa6243a421f8d3 100644 --- a/FramedRendering/oh-package.json5 +++ b/FramedRendering/oh-package.json5 @@ -1,5 +1,5 @@ { - "modelVersion": "5.0.0", + "modelVersion": "5.0.5", "description": "Please describe the basic information.", "dependencies": { "lunar_lite": "^1.0.0" diff --git a/NonSameLayerRendering/README.md b/NonSameLayerRendering/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d66c1b0c5a20d866de84d43192dfbbfe91bca8ba --- /dev/null +++ b/NonSameLayerRendering/README.md @@ -0,0 +1,44 @@ +# 同层渲染原生组件 + +### 介绍 + +在使用Web组件加载H5页面时,经常会有输入框、视频的场景,这些场景在H5中的组件性能体验欠佳。想要更加流畅的体验,必须要将原生组件放到Web组件上。 +本工程配套官网[同层渲染原生组件](https://developer.huawei.com/consumer/cn/doc/best-practices/bpta-render-web-using-same-layer-render), +文章介绍如何在Web组件上使用原生组件同层渲染。 + +### 预览效果 + +![image](screenshots/render.gif) + +### 使用说明 + +1. 打开应用,抓取Trace图分析。 +2. 上下滑动商品列表,抓取Trace图分析。 + +### 工程目录 + +``` +├──entry/src/main/ets +│ ├──entryability +│ │ └──EntryAbility.ets // 程序入口类 +│ ├──entrybackupability +│ │ └──EntryBackupAbility.ets // 自定义应用数据转换和迁移模板类 +│ ├──mock +│ │ └──GoodsMock.ets // 构造页面脏数据 +│ ├──model +│ │ └──GoodsModel.ets // 商品数据结构 +│ └──pages +│ └──Index.ets // 应用首页同层渲染 +└──entry/src/main/resources // 应用资源目录 +``` + +### 相关权限 + +不涉及 + +### 约束与限制 + +* 本示例仅支持标准系统上运行,支持设备:华为手机。 +* 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 diff --git a/NonSameLayerRendering/build-profile.json5 b/NonSameLayerRendering/build-profile.json5 index c033ce4278fb0641d84107c3c134047ac487368e..b2ca56e35558b0dc7ca91989b68a1ea65b49a7a2 100644 --- a/NonSameLayerRendering/build-profile.json5 +++ b/NonSameLayerRendering/build-profile.json5 @@ -5,7 +5,8 @@ { "name": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.5(17)", + "targetSdkVersion": "5.0.5(17)", "runtimeOS": "HarmonyOS", } ], diff --git a/NonSameLayerRendering/entry/src/main/ets/entryability/EntryAbility.ets b/NonSameLayerRendering/entry/src/main/ets/entryability/EntryAbility.ets index 4acdf913caf0268743174e616eb7e51bfe813d78..631333d05052079c193779de35b8a9b062e64f1c 100644 --- a/NonSameLayerRendering/entry/src/main/ets/entryability/EntryAbility.ets +++ b/NonSameLayerRendering/entry/src/main/ets/entryability/EntryAbility.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; import { window } from '@kit.ArkUI'; diff --git a/NonSameLayerRendering/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/NonSameLayerRendering/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets index dc55c03d3eea7ce53d5346c732a39ce9bf5267e1..6b744d7eaa66e51e79fc4e0896e251292ee767c5 100644 --- a/NonSameLayerRendering/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +++ b/NonSameLayerRendering/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { hilog } from '@kit.PerformanceAnalysisKit'; import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; diff --git a/NonSameLayerRendering/entry/src/main/ets/pages/Index.ets b/NonSameLayerRendering/entry/src/main/ets/pages/Index.ets index 513ed3723b41617f4d296b02fd7d0acce09d54d7..c6d374fa8869812826ef492c2a8909a92651732d 100644 --- a/NonSameLayerRendering/entry/src/main/ets/pages/Index.ets +++ b/NonSameLayerRendering/entry/src/main/ets/pages/Index.ets @@ -1,5 +1,19 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // [Start non_same_layer_rendering] -import { promptAction } from '@kit.ArkUI'; import { PRODUCT_DATA } from '../mock/GoodsMock'; import { webview } from '@kit.ArkWeb'; diff --git a/NonSameLayerRendering/hvigor/hvigor-config.json5 b/NonSameLayerRendering/hvigor/hvigor-config.json5 index 2662c04148f9901f7fdcbc0436754f5e2a1766fd..783acc7025ab19e80539da3e033b0b064a12da38 100644 --- a/NonSameLayerRendering/hvigor/hvigor-config.json5 +++ b/NonSameLayerRendering/hvigor/hvigor-config.json5 @@ -1,5 +1,5 @@ { - "modelVersion": "5.0.0", + "modelVersion": "5.0.5", "dependencies": { }, "execution": { diff --git a/NonSameLayerRendering/oh-package.json5 b/NonSameLayerRendering/oh-package.json5 index f3884ebeba43b0beec2ec781d334eb3347549d05..23072fe302bfc938c33aa84a57add30b220c299d 100644 --- a/NonSameLayerRendering/oh-package.json5 +++ b/NonSameLayerRendering/oh-package.json5 @@ -1,5 +1,5 @@ { - "modelVersion": "5.0.0", + "modelVersion": "5.0.5", "description": "Please describe the basic information.", "dependencies": { }, diff --git a/TextureHypercompression/build-profile.json5 b/TextureHypercompression/build-profile.json5 index 6409e9d61125c482443c4aa6fbe24c692276f93d..4a6f5bbad4b2ad113e0d9573327d319d5e525e86 100644 --- a/TextureHypercompression/build-profile.json5 +++ b/TextureHypercompression/build-profile.json5 @@ -5,7 +5,8 @@ { "name": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.5(17)", + "targetSdkVersion": "5.0.5(17)", "runtimeOS": "HarmonyOS", } ], diff --git a/TextureHypercompression/entry/src/main/ets/entryability/EntryAbility.ets b/TextureHypercompression/entry/src/main/ets/entryability/EntryAbility.ets index 4acdf913caf0268743174e616eb7e51bfe813d78..d15033a3e5e15e0e76c5f255508ee62c06e762d1 100644 --- a/TextureHypercompression/entry/src/main/ets/entryability/EntryAbility.ets +++ b/TextureHypercompression/entry/src/main/ets/entryability/EntryAbility.ets @@ -1,3 +1,18 @@ +/* +* Copyright (c) 2024 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; import { window } from '@kit.ArkUI'; diff --git a/TextureHypercompression/entry/src/main/ets/pages/Index.ets b/TextureHypercompression/entry/src/main/ets/pages/Index.ets index 0b55fdac84c4c863a32fe41ac161e1aa60bdb5ca..492142a7dcfe81bc85c548002d8298a20fe10d3e 100644 --- a/TextureHypercompression/entry/src/main/ets/pages/Index.ets +++ b/TextureHypercompression/entry/src/main/ets/pages/Index.ets @@ -1,3 +1,18 @@ +/* +* Copyright (c) 2024 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + @Entry @Component struct TabsExample { diff --git a/TextureHypercompression/hvigor/hvigor-config.json5 b/TextureHypercompression/hvigor/hvigor-config.json5 index 2662c04148f9901f7fdcbc0436754f5e2a1766fd..783acc7025ab19e80539da3e033b0b064a12da38 100644 --- a/TextureHypercompression/hvigor/hvigor-config.json5 +++ b/TextureHypercompression/hvigor/hvigor-config.json5 @@ -1,5 +1,5 @@ { - "modelVersion": "5.0.0", + "modelVersion": "5.0.5", "dependencies": { }, "execution": { diff --git a/TextureHypercompression/oh-package.json5 b/TextureHypercompression/oh-package.json5 index 60a170aa52d32841644eb5dd54f463d11262ce51..35e74b85374a22275b96346fd0381a9823f58d18 100644 --- a/TextureHypercompression/oh-package.json5 +++ b/TextureHypercompression/oh-package.json5 @@ -1,5 +1,5 @@ { - "modelVersion": "5.0.0", + "modelVersion": "5.0.5", "description": "Please describe the basic information.", "dependencies": { },