diff --git a/FloatingViewLib/src/main/java/com/ufreedom/floatingview/Floating.java b/FloatingViewLib/src/main/java/com/ufreedom/floatingview/Floating.java index 17152ffea12feec73bd508d5ed4bf6934c6a848c..59502b6560ecd216e7861592f84c690574b71775 100644 --- a/FloatingViewLib/src/main/java/com/ufreedom/floatingview/Floating.java +++ b/FloatingViewLib/src/main/java/com/ufreedom/floatingview/Floating.java @@ -21,13 +21,11 @@ import com.ufreedom.floatingview.transition.FloatingTransition; import com.ufreedom.floatingview.transition.YumFloating; import com.ufreedom.floatingview.util.LogUtil; import ohos.aafwk.ability.AbilitySlice; -import ohos.agp.components.AttrSet; import ohos.agp.components.Component; import ohos.agp.components.ComponentContainer; import ohos.agp.components.LayoutScatter; import ohos.agp.components.StackLayout; import ohos.agp.utils.Rect; -import ohos.app.Context; /** * Floating @@ -38,7 +36,6 @@ import ohos.app.Context; public class Floating { private StackLayout mFloatingDecorView; private SpringSystem mSpringSystem; - private AbilitySlice mAbility; /** * Floating @@ -48,11 +45,10 @@ public class Floating { * @throws NullPointerException Ability should not be null */ public Floating(AbilitySlice ability, Component topComponent) { - this.mAbility = ability; if (ability == null) { throw new NullPointerException("Ability should not be null"); } - mFloatingDecorView = new FloatingDecorView(ability); + mFloatingDecorView = new StackLayout(ability); mFloatingDecorView.setLayoutConfig(new StackLayout.LayoutConfig(StackLayout.LayoutConfig.MATCH_PARENT, StackLayout.LayoutConfig.MATCH_PARENT)); @@ -111,44 +107,5 @@ public class Floating { floatingAnimator.applyFloating(new YumFloating(targetView, mSpringSystem)); return mFloatingDecorView; } - - /** - * FloatingDecorView - * - * @since 2021-04-23 - */ - public class FloatingDecorView extends StackLayout { - - /** - * FloatingDecorView - * - * @param context - */ - public FloatingDecorView(Context context) { - this(context, null); - } - - /** - * FloatingDecorView - * - * @param context - * @param attrs - */ - public FloatingDecorView(Context context, AttrSet attrs) { - this(context, attrs, null); - } - - /** - * FloatingDecorView - * - * @param context - * @param attrs - * @param defStyle - */ - public FloatingDecorView(Context context, AttrSet attrs, String defStyle) { - super(context, attrs, defStyle); - } - } - } diff --git a/FloatingViewLib/src/main/java/com/ufreedom/floatingview/util/LogUtil.java b/FloatingViewLib/src/main/java/com/ufreedom/floatingview/util/LogUtil.java index 1ef568e267b56b5bffb8e50f892415b24739cb41..75e976e378547e3ad27b2b007d9c8c4541fc729c 100644 --- a/FloatingViewLib/src/main/java/com/ufreedom/floatingview/util/LogUtil.java +++ b/FloatingViewLib/src/main/java/com/ufreedom/floatingview/util/LogUtil.java @@ -2,7 +2,7 @@ * 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 + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/FloatingViewLib/src/test/java/com/ufreedom/floatingview/ExampleTest.java b/FloatingViewLib/src/test/java/com/ufreedom/floatingview/ExampleTest.java index 12f2cb57be4d02e4d30a8488de3584dad4c3896e..0a07e1b8b688a0ba6255741951b223947edfb158 100644 --- a/FloatingViewLib/src/test/java/com/ufreedom/floatingview/ExampleTest.java +++ b/FloatingViewLib/src/test/java/com/ufreedom/floatingview/ExampleTest.java @@ -2,7 +2,7 @@ * 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 + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/com/ufreedom/demo/MainAbility.java b/entry/src/main/java/com/ufreedom/demo/MainAbility.java index ca27bdd4a7fcdb905830845fbef2ab9aa0834797..ed2f08ded74ad15b98b7f824f0d4706ebe8afe15 100644 --- a/entry/src/main/java/com/ufreedom/demo/MainAbility.java +++ b/entry/src/main/java/com/ufreedom/demo/MainAbility.java @@ -2,7 +2,7 @@ * 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 + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/com/ufreedom/demo/MyApplication.java b/entry/src/main/java/com/ufreedom/demo/MyApplication.java index 1934fbd221f467d9eb9dc6e95d6eddbf467da31c..53fbbc29f3c53570d2d8355aac92ce6beae63dde 100644 --- a/entry/src/main/java/com/ufreedom/demo/MyApplication.java +++ b/entry/src/main/java/com/ufreedom/demo/MyApplication.java @@ -2,7 +2,7 @@ * 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 + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/com/ufreedom/demo/UiUtils.java b/entry/src/main/java/com/ufreedom/demo/UiUtils.java index 3598700d7ea275b1731deac3ba6053aec3c3b744..afd04463bb9a41098aae6db70751894a8e3972e0 100644 --- a/entry/src/main/java/com/ufreedom/demo/UiUtils.java +++ b/entry/src/main/java/com/ufreedom/demo/UiUtils.java @@ -2,7 +2,7 @@ * 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 + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/com/ufreedom/demo/slice/MainAbilitySlice.java b/entry/src/main/java/com/ufreedom/demo/slice/MainAbilitySlice.java index 09ade7edda87ed4a022ca9c557791c602ba60218..4008d725e497da8020acd0b44b11149e8156f0ae 100644 --- a/entry/src/main/java/com/ufreedom/demo/slice/MainAbilitySlice.java +++ b/entry/src/main/java/com/ufreedom/demo/slice/MainAbilitySlice.java @@ -2,7 +2,7 @@ * 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 + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/com/ufreedom/demo/util/AnimatorStateChangedListener.java b/entry/src/main/java/com/ufreedom/demo/util/AnimatorStateChangedListener.java index 86afb61543f467f08aa329446df9fc62f05ff232..be0032ce8afc12cc9a1548844f86ccbe97ee4628 100644 --- a/entry/src/main/java/com/ufreedom/demo/util/AnimatorStateChangedListener.java +++ b/entry/src/main/java/com/ufreedom/demo/util/AnimatorStateChangedListener.java @@ -2,7 +2,7 @@ * 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 + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/ohosTest/java/com/ufreedom/demo/ExampleOhosTest.java b/entry/src/ohosTest/java/com/ufreedom/demo/ExampleOhosTest.java index 62a3d0656adc2d18c5841651cfaca5fed469165e..0414719653e4b8f108c2ae0a3ac707b6e88b780c 100644 --- a/entry/src/ohosTest/java/com/ufreedom/demo/ExampleOhosTest.java +++ b/entry/src/ohosTest/java/com/ufreedom/demo/ExampleOhosTest.java @@ -2,7 +2,7 @@ * 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 + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/test/java/com/ufreedom/demo/ExampleTest.java b/entry/src/test/java/com/ufreedom/demo/ExampleTest.java index a6ba95b3b7e1e52d41ba7e5c4ee91f0a4c5eaff5..c536f197728109072e689c1fa808c84bbeb1bd6c 100644 --- a/entry/src/test/java/com/ufreedom/demo/ExampleTest.java +++ b/entry/src/test/java/com/ufreedom/demo/ExampleTest.java @@ -2,7 +2,7 @@ * 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 + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *