From 3db73e9a077fa229a3ce4ffee2efd3addaa2e841 Mon Sep 17 00:00:00 2001 From: rekirt Date: Sat, 30 Aug 2025 13:53:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0readme=E5=92=8Ccopyright?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WaterFlowSample/README.md | 19 +++++++++++++++++++ .../ets/common/constants/CommonConstants.ets | 2 +- .../main/ets/entryability/EntryAbility.ets | 15 +++++++++++++++ .../entrybackupability/EntryBackupAbility.ets | 15 +++++++++++++++ .../entry/src/main/ets/model/MyDataSource.ets | 1 + .../main/ets/pages/CustomItemHeightPage.ets | 15 +++++++++++++++ .../src/main/ets/pages/DataLoadMorePage.ets | 15 +++++++++++++++ .../ets/pages/DataUpadteAndAnimationPage.ets | 15 +++++++++++++++ .../src/main/ets/pages/ElementByOrderPage.ets | 15 +++++++++++++++ .../src/main/ets/pages/FadingEdgePage.ets | 15 +++++++++++++++ .../main/ets/pages/FlowItemAutoPlayPage.ets | 15 +++++++++++++++ .../ets/pages/FlowItemRmoveAnimationPage.ets | 15 +++++++++++++++ .../src/main/ets/pages/FlowItemRmovePage.ets | 15 +++++++++++++++ .../main/ets/pages/ForceShowOnTopLeftPage.ets | 15 +++++++++++++++ .../entry/src/main/ets/pages/Index.ets | 1 - .../ets/pages/MergeDoubleWaterFlowPage.ets | 15 +++++++++++++++ .../main/ets/pages/SectionOptionsUsePage.ets | 15 +++++++++++++++ .../src/main/ets/pages/StickOnTopPage.ets | 15 +++++++++++++++ .../main/ets/pages/ZoomChangeColumnPage.ets | 15 +++++++++++++++ .../entry/src/main/ets/utils/WindowUtil.ets | 2 +- 20 files changed, 247 insertions(+), 3 deletions(-) create mode 100644 WaterFlowSample/README.md diff --git a/WaterFlowSample/README.md b/WaterFlowSample/README.md new file mode 100644 index 00000000..d8f32c0a --- /dev/null +++ b/WaterFlowSample/README.md @@ -0,0 +1,19 @@ +# 常见瀑布流操作 + +### 简介 + +本示例基于WaterFlow组件的特性,整理了瀑布流常见操作的示例代码。 + +### 相关权限 + +不涉及 + +### 约束与限制 + +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 diff --git a/WaterFlowSample/entry/src/main/ets/common/constants/CommonConstants.ets b/WaterFlowSample/entry/src/main/ets/common/constants/CommonConstants.ets index a6ba20f2..5de6c0e9 100644 --- a/WaterFlowSample/entry/src/main/ets/common/constants/CommonConstants.ets +++ b/WaterFlowSample/entry/src/main/ets/common/constants/CommonConstants.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 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 diff --git a/WaterFlowSample/entry/src/main/ets/entryability/EntryAbility.ets b/WaterFlowSample/entry/src/main/ets/entryability/EntryAbility.ets index a1b9d910..eac02998 100644 --- a/WaterFlowSample/entry/src/main/ets/entryability/EntryAbility.ets +++ b/WaterFlowSample/entry/src/main/ets/entryability/EntryAbility.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; import { window } from '@kit.ArkUI'; diff --git a/WaterFlowSample/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/WaterFlowSample/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets index fae19f9d..1fca37ec 100644 --- a/WaterFlowSample/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +++ b/WaterFlowSample/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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/WaterFlowSample/entry/src/main/ets/model/MyDataSource.ets b/WaterFlowSample/entry/src/main/ets/model/MyDataSource.ets index 540edfc0..ceef0cc5 100644 --- a/WaterFlowSample/entry/src/main/ets/model/MyDataSource.ets +++ b/WaterFlowSample/entry/src/main/ets/model/MyDataSource.ets @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { BasicDataSource } from "./BasicDataSource"; export class MyDataSource extends BasicDataSource { diff --git a/WaterFlowSample/entry/src/main/ets/pages/CustomItemHeightPage.ets b/WaterFlowSample/entry/src/main/ets/pages/CustomItemHeightPage.ets index 95b6dd02..bf51f3f0 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/CustomItemHeightPage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/CustomItemHeightPage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { SectionsWaterFlowDataSource } from "../model/SectionsWaterFlowDataSource"; // [StartExclude flow_item_layout] diff --git a/WaterFlowSample/entry/src/main/ets/pages/DataLoadMorePage.ets b/WaterFlowSample/entry/src/main/ets/pages/DataLoadMorePage.ets index a5796056..63b36a2c 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/DataLoadMorePage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/DataLoadMorePage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { CommonConstants } from "../common/constants/CommonConstants"; import { SectionsWaterFlowDataSource } from "../model/SectionsWaterFlowDataSource"; diff --git a/WaterFlowSample/entry/src/main/ets/pages/DataUpadteAndAnimationPage.ets b/WaterFlowSample/entry/src/main/ets/pages/DataUpadteAndAnimationPage.ets index 577a7a7e..89e5fcaa 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/DataUpadteAndAnimationPage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/DataUpadteAndAnimationPage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { CommonConstants } from "../common/constants/CommonConstants"; import { SectionsWaterFlowDataSource } from "../model/SectionsWaterFlowDataSource"; diff --git a/WaterFlowSample/entry/src/main/ets/pages/ElementByOrderPage.ets b/WaterFlowSample/entry/src/main/ets/pages/ElementByOrderPage.ets index 2cabc98a..06f953b9 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/ElementByOrderPage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/ElementByOrderPage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 { CommonConstants } from '../common/constants/CommonConstants'; @Entry diff --git a/WaterFlowSample/entry/src/main/ets/pages/FadingEdgePage.ets b/WaterFlowSample/entry/src/main/ets/pages/FadingEdgePage.ets index 6826eed2..66ae7e2c 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/FadingEdgePage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/FadingEdgePage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { CommonConstants } from "../common/constants/CommonConstants"; import { SectionsWaterFlowDataSource } from "../model/SectionsWaterFlowDataSource"; diff --git a/WaterFlowSample/entry/src/main/ets/pages/FlowItemAutoPlayPage.ets b/WaterFlowSample/entry/src/main/ets/pages/FlowItemAutoPlayPage.ets index 6606e901..a109868f 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/FlowItemAutoPlayPage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/FlowItemAutoPlayPage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { hilog } from '@kit.PerformanceAnalysisKit'; import { CommonConstants } from '../common/constants/CommonConstants'; diff --git a/WaterFlowSample/entry/src/main/ets/pages/FlowItemRmoveAnimationPage.ets b/WaterFlowSample/entry/src/main/ets/pages/FlowItemRmoveAnimationPage.ets index a38c698c..de352726 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/FlowItemRmoveAnimationPage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/FlowItemRmoveAnimationPage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { CommonConstants } from "../common/constants/CommonConstants"; import { SectionsWaterFlowDataSource } from "../model/SectionsWaterFlowDataSource"; diff --git a/WaterFlowSample/entry/src/main/ets/pages/FlowItemRmovePage.ets b/WaterFlowSample/entry/src/main/ets/pages/FlowItemRmovePage.ets index 870d96ac..39fd4513 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/FlowItemRmovePage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/FlowItemRmovePage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { SectionsWaterFlowDataSource } from "../model/SectionsWaterFlowDataSource"; // [StartExclude flow_item_layout] diff --git a/WaterFlowSample/entry/src/main/ets/pages/ForceShowOnTopLeftPage.ets b/WaterFlowSample/entry/src/main/ets/pages/ForceShowOnTopLeftPage.ets index a711b368..24ad635d 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/ForceShowOnTopLeftPage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/ForceShowOnTopLeftPage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { CommonConstants } from '../common/constants/CommonConstants'; import { MyDataSource } from '../model/MyDataSource' diff --git a/WaterFlowSample/entry/src/main/ets/pages/Index.ets b/WaterFlowSample/entry/src/main/ets/pages/Index.ets index 05cb67b4..e92c9301 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/Index.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/Index.ets @@ -13,7 +13,6 @@ * limitations under the License. */ - @Entry @Component struct Index { diff --git a/WaterFlowSample/entry/src/main/ets/pages/MergeDoubleWaterFlowPage.ets b/WaterFlowSample/entry/src/main/ets/pages/MergeDoubleWaterFlowPage.ets index 54cb0e86..9e259d3b 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/MergeDoubleWaterFlowPage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/MergeDoubleWaterFlowPage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { CommonConstants } from '../common/constants/CommonConstants'; import { MyDataSource } from '../model/MyDataSource' diff --git a/WaterFlowSample/entry/src/main/ets/pages/SectionOptionsUsePage.ets b/WaterFlowSample/entry/src/main/ets/pages/SectionOptionsUsePage.ets index 12137c6a..86f8ec47 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/SectionOptionsUsePage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/SectionOptionsUsePage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { CommonConstants } from "../common/constants/CommonConstants"; import { SectionsWaterFlowDataSource } from "../model/SectionsWaterFlowDataSource"; diff --git a/WaterFlowSample/entry/src/main/ets/pages/StickOnTopPage.ets b/WaterFlowSample/entry/src/main/ets/pages/StickOnTopPage.ets index 929dc3ed..ff5b1cb6 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/StickOnTopPage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/StickOnTopPage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { hilog } from '@kit.PerformanceAnalysisKit'; import { CommonConstants } from '../common/constants/CommonConstants'; diff --git a/WaterFlowSample/entry/src/main/ets/pages/ZoomChangeColumnPage.ets b/WaterFlowSample/entry/src/main/ets/pages/ZoomChangeColumnPage.ets index aef08e29..f000305f 100644 --- a/WaterFlowSample/entry/src/main/ets/pages/ZoomChangeColumnPage.ets +++ b/WaterFlowSample/entry/src/main/ets/pages/ZoomChangeColumnPage.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 quick_start] import { MyDataSource } from '../model/MyDataSource' import { image } from '@kit.ImageKit'; diff --git a/WaterFlowSample/entry/src/main/ets/utils/WindowUtil.ets b/WaterFlowSample/entry/src/main/ets/utils/WindowUtil.ets index f711a36f..535ac139 100644 --- a/WaterFlowSample/entry/src/main/ets/utils/WindowUtil.ets +++ b/WaterFlowSample/entry/src/main/ets/utils/WindowUtil.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 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 -- Gitee