From aa189ff83a1cb890305b29e1621c3f09dc81ac72 Mon Sep 17 00:00:00 2001 From: fjh Date: Mon, 24 May 2021 14:29:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9D=83=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 --- .../com/tuyenmonkey/sample/MainAbility.java | 21 ++++++++++++++++ .../com/tuyenmonkey/sample/MyApplication.java | 22 +++++++++++++++- .../sample/slice/MainAbilitySlice.java | 25 ++++++++++++++++--- 4 files changed, 63 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ca38489..804a9fb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # mkloader -**本项目基于开源项目mkloader进行openharmony的移植和开发,可以通过项目标签以及github地址( https://github.com/nntuyen/mkloader )追踪到原项目版本** - #### 项目介绍 - 项目名称:加载动画 - 所属系列:openharmony的第三方组件适配移植 @@ -10,7 +8,6 @@ - 项目移植状态:主功能完成 - 调用差异:无 - 开发版本:sdk5,DevEco Studio2.1.0.301 beta3 -- 原项目Doc地址:https://github.com/nntuyen/mkloader #### 效果演示 diff --git a/entry/src/main/java/com/tuyenmonkey/sample/MainAbility.java b/entry/src/main/java/com/tuyenmonkey/sample/MainAbility.java index 5d41ef6..ecd67ce 100644 --- a/entry/src/main/java/com/tuyenmonkey/sample/MainAbility.java +++ b/entry/src/main/java/com/tuyenmonkey/sample/MainAbility.java @@ -1,9 +1,30 @@ +/* + * Copyright (C) 2021 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 an 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. + */ + package com.tuyenmonkey.sample; import com.tuyenmonkey.sample.slice.MainAbilitySlice; import ohos.aafwk.ability.Ability; import ohos.aafwk.content.Intent; +/** + * 主入口 + * + * @author fjh + * @since 2021-05-24 + */ public class MainAbility extends Ability { @Override public void onStart(Intent intent) { diff --git a/entry/src/main/java/com/tuyenmonkey/sample/MyApplication.java b/entry/src/main/java/com/tuyenmonkey/sample/MyApplication.java index 487e9c6..d667ffc 100644 --- a/entry/src/main/java/com/tuyenmonkey/sample/MyApplication.java +++ b/entry/src/main/java/com/tuyenmonkey/sample/MyApplication.java @@ -1,11 +1,31 @@ +/* + * Copyright (C) 2021 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 an 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. + */ + package com.tuyenmonkey.sample; import ohos.aafwk.ability.AbilityPackage; +/** + * 主应用 + * + * @author fjh + * @since 2021-05-24 + */ public class MyApplication extends AbilityPackage { @Override public void onInitialize() { super.onInitialize(); - } } diff --git a/entry/src/main/java/com/tuyenmonkey/sample/slice/MainAbilitySlice.java b/entry/src/main/java/com/tuyenmonkey/sample/slice/MainAbilitySlice.java index 45b74d8..c4e36a7 100644 --- a/entry/src/main/java/com/tuyenmonkey/sample/slice/MainAbilitySlice.java +++ b/entry/src/main/java/com/tuyenmonkey/sample/slice/MainAbilitySlice.java @@ -1,11 +1,30 @@ +/* + * Copyright (C) 2021 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 an 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. + */ + package com.tuyenmonkey.sample.slice; -import com.tuyenmonkey.mkloader.MKLoader; import com.tuyenmonkey.sample.ResourceTable; import ohos.aafwk.ability.AbilitySlice; import ohos.aafwk.content.Intent; -import ohos.agp.components.element.Element; +/** + * 主页面 + * + * @author fjh + * @since 2021-05-24 + */ public class MainAbilitySlice extends AbilitySlice { @Override public void onStart(Intent intent) { @@ -20,12 +39,10 @@ public class MainAbilitySlice extends AbilitySlice { @Override public void onActive() { super.onActive(); - } @Override public void onForeground(Intent intent) { super.onForeground(intent); } - } -- Gitee