Loading src/com/android/launcher3/allapps/AllAppsTransitionController.java +14 −2 Original line number Diff line number Diff line Loading @@ -76,6 +76,8 @@ public class AllAppsTransitionController } }; private static final float ALL_APPS_PULL_BACK_TRANSLATION_DEFAULT = 0f; public static final FloatProperty<AllAppsTransitionController> ALL_APPS_PULL_BACK_TRANSLATION = new FloatProperty<AllAppsTransitionController>("allAppsPullBackTranslation") { Loading @@ -92,12 +94,18 @@ public class AllAppsTransitionController public void setValue(AllAppsTransitionController controller, float translation) { if (controller.mIsTablet) { controller.mAppsView.getActiveRecyclerView().setTranslationY(translation); controller.getAppsViewPullbackTranslationY().setValue( ALL_APPS_PULL_BACK_TRANSLATION_DEFAULT); } else { controller.getAppsViewPullbackTranslationY().setValue(translation); controller.mAppsView.getActiveRecyclerView().setTranslationY( ALL_APPS_PULL_BACK_TRANSLATION_DEFAULT); } } }; private static final float ALL_APPS_PULL_BACK_ALPHA_DEFAULT = 1f; public static final FloatProperty<AllAppsTransitionController> ALL_APPS_PULL_BACK_ALPHA = new FloatProperty<AllAppsTransitionController>("allAppsPullBackAlpha") { Loading @@ -114,8 +122,12 @@ public class AllAppsTransitionController public void setValue(AllAppsTransitionController controller, float alpha) { if (controller.mIsTablet) { controller.mAppsView.getActiveRecyclerView().setAlpha(alpha); controller.getAppsViewPullbackAlpha().setValue( ALL_APPS_PULL_BACK_ALPHA_DEFAULT); } else { controller.getAppsViewPullbackAlpha().setValue(alpha); controller.mAppsView.getActiveRecyclerView().setAlpha( ALL_APPS_PULL_BACK_ALPHA_DEFAULT); } } }; Loading Loading @@ -232,8 +244,8 @@ public class AllAppsTransitionController builder.addEndListener(success -> { // Reset pull back progress and alpha after switching states. ALL_APPS_PULL_BACK_TRANSLATION.set(this, 0f); ALL_APPS_PULL_BACK_ALPHA.set(this, 1f); ALL_APPS_PULL_BACK_TRANSLATION.set(this, ALL_APPS_PULL_BACK_TRANSLATION_DEFAULT); ALL_APPS_PULL_BACK_ALPHA.set(this, ALL_APPS_PULL_BACK_ALPHA_DEFAULT); // We only want to close the keyboard if the animation has completed successfully. // The reason is that with keyboard sync, if the user swipes down from All Apps with Loading Loading
src/com/android/launcher3/allapps/AllAppsTransitionController.java +14 −2 Original line number Diff line number Diff line Loading @@ -76,6 +76,8 @@ public class AllAppsTransitionController } }; private static final float ALL_APPS_PULL_BACK_TRANSLATION_DEFAULT = 0f; public static final FloatProperty<AllAppsTransitionController> ALL_APPS_PULL_BACK_TRANSLATION = new FloatProperty<AllAppsTransitionController>("allAppsPullBackTranslation") { Loading @@ -92,12 +94,18 @@ public class AllAppsTransitionController public void setValue(AllAppsTransitionController controller, float translation) { if (controller.mIsTablet) { controller.mAppsView.getActiveRecyclerView().setTranslationY(translation); controller.getAppsViewPullbackTranslationY().setValue( ALL_APPS_PULL_BACK_TRANSLATION_DEFAULT); } else { controller.getAppsViewPullbackTranslationY().setValue(translation); controller.mAppsView.getActiveRecyclerView().setTranslationY( ALL_APPS_PULL_BACK_TRANSLATION_DEFAULT); } } }; private static final float ALL_APPS_PULL_BACK_ALPHA_DEFAULT = 1f; public static final FloatProperty<AllAppsTransitionController> ALL_APPS_PULL_BACK_ALPHA = new FloatProperty<AllAppsTransitionController>("allAppsPullBackAlpha") { Loading @@ -114,8 +122,12 @@ public class AllAppsTransitionController public void setValue(AllAppsTransitionController controller, float alpha) { if (controller.mIsTablet) { controller.mAppsView.getActiveRecyclerView().setAlpha(alpha); controller.getAppsViewPullbackAlpha().setValue( ALL_APPS_PULL_BACK_ALPHA_DEFAULT); } else { controller.getAppsViewPullbackAlpha().setValue(alpha); controller.mAppsView.getActiveRecyclerView().setAlpha( ALL_APPS_PULL_BACK_ALPHA_DEFAULT); } } }; Loading Loading @@ -232,8 +244,8 @@ public class AllAppsTransitionController builder.addEndListener(success -> { // Reset pull back progress and alpha after switching states. ALL_APPS_PULL_BACK_TRANSLATION.set(this, 0f); ALL_APPS_PULL_BACK_ALPHA.set(this, 1f); ALL_APPS_PULL_BACK_TRANSLATION.set(this, ALL_APPS_PULL_BACK_TRANSLATION_DEFAULT); ALL_APPS_PULL_BACK_ALPHA.set(this, ALL_APPS_PULL_BACK_ALPHA_DEFAULT); // We only want to close the keyboard if the animation has completed successfully. // The reason is that with keyboard sync, if the user swipes down from All Apps with Loading