diff --git a/.idea/$PROJECT_FILE$ b/.idea/$PROJECT_FILE$ deleted file mode 100644 index 58b7e3e570f8289344d345f6e3634608e74c690d..0000000000000000000000000000000000000000 --- a/.idea/$PROJECT_FILE$ +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 26d33521af10bcc7fd8cea344038eaaeb78d0ef5..0000000000000000000000000000000000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml deleted file mode 100644 index 6eefe0e18e7f9b22e04bd7ae191213bd65c48515..0000000000000000000000000000000000000000 --- a/.idea/checkstyle-idea.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 61a9130cd9669c3843e6445dfe1fee2d493869bc..0000000000000000000000000000000000000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 09a3655cec0d06758fd57cb9d7b537c6d64eb03f..0000000000000000000000000000000000000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 6560a98983ec708cf9d8b5c5c3776d7bd39c475b..0000000000000000000000000000000000000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index a72f5535ccfa09a7a2f177a03928872469ae7308..0000000000000000000000000000000000000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 4fc39a5d9fa39f8b37bc2ac2eaa677fe95a82c20..0000000000000000000000000000000000000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/qaplug_profiles.xml b/.idea/qaplug_profiles.xml deleted file mode 100644 index ddfa82311f47201fcea94973e163ec0234933460..0000000000000000000000000000000000000000 --- a/.idea/qaplug_profiles.xml +++ /dev/null @@ -1,635 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddfbbc029bcab630581847471d7f238ec53..0000000000000000000000000000000000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index 5d9e78fd057f45c5f4f3ed93dc0c051e824f3dd0..24b6ff5e26b06d6a3d4e6bebcaa9ee351aa6c81a 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,7 @@ - 基线版本: ShadowLayout Releases master - 项目移植状态:已完成 - 调用差异:无 -- 开发版本:sdk5,DevEco Studio2.3 beta3 -- 项目作者和维护人:任鹏飞 -- 联系方式:renpengfei073@chinasoftinc.com +- 开发版本:sdk5,DevEco Studio2.1 beta4 - 原项目Doc地址: - 编程语言:Java @@ -128,8 +126,6 @@ CloudTest代码测试无异常 当前版本demo功能与原组件基本无差异 -测试员:李姗姗 - ## 版本迭代 - 0.0.1-SNAPSHOT diff --git a/build.gradle b/build.gradle index f53d82cbc14c4a26117b5a846256fbb6749751be..6d0dbb11773ccbf24e16c402140108b56acdbcb9 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ ohos { compatibleSdkVersion 4 } } - + buildscript { repositories { maven { @@ -16,10 +16,10 @@ buildscript { maven { url 'https://developer.huawei.com/repo/' } - jcenter() + jcenter() } dependencies { - classpath 'com.huawei.ohos:hap:2.4.2.5' + classpath 'com.huawei.ohos:hap:2.4.2.7' classpath 'com.huawei.ohos:decctest:1.0.0.6' } } @@ -35,6 +35,6 @@ allprojects { maven { url 'https://developer.huawei.com/repo/' } - jcenter() + jcenter() } } diff --git a/changeLog.md b/changeLog.md index 101aa7430709030d1d3af45afa2e9b1b4bc313c2..ae90cbd326ed458e448cb78fd182706181bb444d 100644 --- a/changeLog.md +++ b/changeLog.md @@ -8,4 +8,4 @@ # 遗留问题(暂不支持的功能): -1. 暂无 \ No newline at end of file +1. 与原项目阴影效果显示有差异(描边问题无法处理) \ No newline at end of file diff --git a/entry/src/main/config.json b/entry/src/main/config.json index 1e79f99d387dd786d96b58a79e3c62aedb701d89..86c226216f866c2551dbf12dfc91542e836b4694 100644 --- a/entry/src/main/config.json +++ b/entry/src/main/config.json @@ -9,7 +9,7 @@ "apiVersion": { "compatible": 4, "target": 5, - "releaseType": "Beta1" + "releaseType": "Release" } }, "deviceConfig": {}, diff --git a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/MainAbility.java b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/MainAbility.java index fc7795b1c114748b68e53b7d50ed85fb4b4cfb36..a3a6b32d7365852c01f432b4314457f93e05057b 100644 --- a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/MainAbility.java +++ b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/MainAbility.java @@ -7,10 +7,15 @@ import ohos.aafwk.content.Intent; /** * 主页 * - * @author renpengfei + * @author rpf * @since 2021-03-08 */ public class MainAbility extends Ability { + /** + * onStart + * + * @param intent + */ @Override public void onStart(Intent intent) { super.onStart(intent); diff --git a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/MyApplication.java b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/MyApplication.java index e550c1417d844479fb0e2b251d851881270c58ab..29074084ad27432d7fb9e582e3e036766cc56994 100644 --- a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/MyApplication.java +++ b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/MyApplication.java @@ -5,10 +5,13 @@ import ohos.aafwk.ability.AbilityPackage; /** * 主程序 * - * @author renpengfei + * @author rpf * @since 2021-03-08 */ public class MyApplication extends AbilityPackage { + /** + * onInitialize + */ @Override public void onInitialize() { super.onInitialize(); diff --git a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/provider/SampleItemProvider.java b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/provider/SampleItemProvider.java index 119b2b4ee9e62f0d2ceaae97eb64207d810afa48..130ba37226b941357264703b7a8ea236b1a96f95 100644 --- a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/provider/SampleItemProvider.java +++ b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/provider/SampleItemProvider.java @@ -31,11 +31,22 @@ public class SampleItemProvider extends BaseItemProvider { this.abilitySlice = abilitySlice; } + /** + * getCount + * + * @return int + */ @Override public int getCount() { return list == null ? 0 : list.size(); } + /** + * getItem + * + * @param position + * @return Object + */ @Override public Object getItem(int position) { if (list != null && position >= 0 && position < list.size()) { @@ -44,11 +55,25 @@ public class SampleItemProvider extends BaseItemProvider { return new Object(); } + /** + * getItemId + * + * @param position + * @return long + */ @Override public long getItemId(int position) { return position; } + /** + * getComponent + * + * @param position + * @param component + * @param componentContainer + * @return Component + */ @Override public Component getComponent(int position, Component component, ComponentContainer componentContainer) { Component component1 = LayoutScatter.getInstance(abilitySlice).parse(ResourceTable.Layout_item_sample, diff --git a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/DynamicChangeAbilitySlice.java b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/DynamicChangeAbilitySlice.java index d51131e5c33190de5e7093a9f95a7177b3341d08..e8e3bc74c766b991e871c663bb33a226b2ae7cda 100644 --- a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/DynamicChangeAbilitySlice.java +++ b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/DynamicChangeAbilitySlice.java @@ -18,6 +18,11 @@ public class DynamicChangeAbilitySlice extends AbilitySlice { private static final float RADIUS = 10f; private static final float DEFAULT_RADIUS = 20f; + /** + * onStart + * + * @param intent + */ @Override public void onStart(Intent intent) { super.onStart(intent); @@ -58,11 +63,19 @@ public class DynamicChangeAbilitySlice extends AbilitySlice { }); } + /** + * onActive + */ @Override public void onActive() { super.onActive(); } + /** + * onForeground + * + * @param intent + */ @Override public void onForeground(Intent intent) { super.onForeground(intent); diff --git a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/ListAbilitySlice.java b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/ListAbilitySlice.java index 4a2085fe50517b5be993d4c655cf7ad3ace64463..dbc9d56ea5ca685422bb02264618b892747234b1 100644 --- a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/ListAbilitySlice.java +++ b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/ListAbilitySlice.java @@ -20,6 +20,11 @@ public class ListAbilitySlice extends AbilitySlice { private ListContainer listContainer; private List list; + /** + * onStart + * + * @param intent + */ @Override public void onStart(Intent intent) { super.onStart(intent); @@ -40,11 +45,20 @@ public class ListAbilitySlice extends AbilitySlice { listContainer.setItemProvider(provider); } + /** + * onActive + * + */ @Override public void onActive() { super.onActive(); } + /** + * onForeground + * + * @param intent + */ @Override public void onForeground(Intent intent) { super.onForeground(intent); diff --git a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/MainAbilitySlice.java b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/MainAbilitySlice.java index 461553e0d628a30569769c58a09189539c8ea200..7bb625db728f4b6bc263125523b7a3b1d4704730 100644 --- a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/MainAbilitySlice.java +++ b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/MainAbilitySlice.java @@ -11,12 +11,17 @@ import ohos.hiviewdfx.HiLogLabel; /** * 主页 * - * @author renpengfei + * @author rpf * @since 2021-03-08 */ public class MainAbilitySlice extends AbilitySlice { private HiLogLabel logLabel = new HiLogLabel(HiLog.LOG_APP, 0x00001, "ShadowLayout"); + /** + * onStart + * + * @param intent + */ @Override public void onStart(Intent intent) { super.onStart(intent); @@ -54,30 +59,47 @@ public class MainAbilitySlice extends AbilitySlice { }); } + /** + * onActive + */ @Override public void onActive() { super.onActive(); HiLog.info(logLabel, "onActive"); } + /** + * onForeground + * + * @param intent + */ @Override public void onForeground(Intent intent) { super.onForeground(intent); HiLog.info(logLabel, "onForeground"); } + /** + * onBackground + */ @Override protected void onBackground() { super.onBackground(); HiLog.info(logLabel, "onBackground"); } + /** + * onStop + */ @Override protected void onStop() { super.onStop(); HiLog.info(logLabel, "onStop"); } + /** + * onInactive + */ @Override protected void onInactive() { super.onInactive(); diff --git a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/ShowAbilitySlice.java b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/ShowAbilitySlice.java index a4c1f31819de67919734a07be65e6cfee56ac7b9..5bf5e25b4033a71da57e79aa7690efe37c28df3f 100644 --- a/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/ShowAbilitySlice.java +++ b/entry/src/main/java/com/lijiankun24/shadowlayoutexample/slice/ShowAbilitySlice.java @@ -11,6 +11,11 @@ import ohos.aafwk.content.Intent; * @since 2021-03-08 */ public class ShowAbilitySlice extends AbilitySlice { + /** + * onStart + * + * @param intent + */ @Override public void onStart(Intent intent) { super.onStart(intent); @@ -22,11 +27,19 @@ public class ShowAbilitySlice extends AbilitySlice { private void initComponent() { } + /** + * onActive + */ @Override public void onActive() { super.onActive(); } + /** + * onForeground + * + * @param intent + */ @Override public void onForeground(Intent intent) { super.onForeground(intent); diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index dac8add941e2ba7a9db7566b30a83a5e404c19a2..6374dfc350061c65172eb7ab3dac407fac836e6e 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -2,7 +2,7 @@ "string": [ { "name": "app_name", - "value": "HM_ShadowLayout" + "value": "ShadowLayout" }, { "name": "mainability_description", diff --git a/entry/src/main/resources/base/graphic/background_ability_dynamic_change.xml b/entry/src/main/resources/base/graphic/background_ability_dynamic_change.xml index a002c2353e78af3a15235e00738328ff566bc085..8153d1aa09d4ef80d93955768cf61680cd4ab761 100644 --- a/entry/src/main/resources/base/graphic/background_ability_dynamic_change.xml +++ b/entry/src/main/resources/base/graphic/background_ability_dynamic_change.xml @@ -4,5 +4,8 @@ ohos:shape="rectangle"> + ohos:color="#ff33b5e5"/> + + \ No newline at end of file diff --git a/entry/src/main/resources/base/layout/ability_dynamic_change.xml b/entry/src/main/resources/base/layout/ability_dynamic_change.xml index c2d360d1f05d094e9a2d41b47fb362b79eaa6641..235c03b22cc67f9bd6a3dd6c7e83278b7203e969 100644 --- a/entry/src/main/resources/base/layout/ability_dynamic_change.xml +++ b/entry/src/main/resources/base/layout/ability_dynamic_change.xml @@ -86,7 +86,7 @@