diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-11-07 23:35:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-11-07 23:35:15 +0000 |
commit | 45656e296fb53ec0f60dc1ec00b06637a395bb43 (patch) | |
tree | 14122c642e6a2816dc5af9188b8829211189bb41 /src | |
parent | 00105625f4db70628b1ee9392932ff43a3a19776 (diff) | |
parent | a5020007e386012225754a367fcf20d2d269e502 (diff) | |
download | android_packages_apps_Trebuchet-45656e296fb53ec0f60dc1ec00b06637a395bb43.tar.gz android_packages_apps_Trebuchet-45656e296fb53ec0f60dc1ec00b06637a395bb43.tar.bz2 android_packages_apps_Trebuchet-45656e296fb53ec0f60dc1ec00b06637a395bb43.zip |
Merge "Scaling down hotseat to match prediction row size when going to overview" into ub-launcher3-qt-future-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/WorkspaceStateTransitionAnimation.java | 16 | ||||
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsTransitionController.java | 11 |
2 files changed, 7 insertions, 20 deletions
diff --git a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java index 40c6b5f1b..7a7e1fee6 100644 --- a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java +++ b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java @@ -38,7 +38,6 @@ import com.android.launcher3.LauncherState.ScaleAndTranslation; import com.android.launcher3.LauncherStateManager.AnimationConfig; import com.android.launcher3.anim.AnimatorSetBuilder; import com.android.launcher3.anim.PropertySetter; -import com.android.launcher3.dragndrop.DragLayer; import com.android.launcher3.graphics.WorkspaceAndHotseatScrim; /** @@ -96,14 +95,13 @@ public class WorkspaceStateTransitionAnimation { propertySetter.setFloat(mWorkspace, SCALE_PROPERTY, mNewScale, scaleInterpolator); if (!hotseat.getRotationMode().isTransposed) { - // Set the hotseat's pivot point to match the workspace's, so that it scales together. - DragLayer dragLayer = mLauncher.getDragLayer(); - float[] workspacePivot = - new float[]{ mWorkspace.getPivotX(), mWorkspace.getPivotY() }; - dragLayer.getDescendantCoordRelativeToSelf(mWorkspace, workspacePivot); - dragLayer.mapCoordInSelfToDescendant(hotseat, workspacePivot); - hotseat.setPivotX(workspacePivot[0]); - hotseat.setPivotY(workspacePivot[1]); + // Set the hotseat's pivot point to match the workspace's, so that it scales + // together. Since both hotseat and workspace can move, transform the point + // manually instead of using dragLayer.getDescendantCoordRelativeToSelf and + // related methods. + hotseat.setPivotY(mWorkspace.getPivotY() + mWorkspace.getTop() - hotseat.getTop()); + hotseat.setPivotX(mWorkspace.getPivotX() + + mWorkspace.getLeft() - hotseat.getLeft()); } float hotseatScale = hotseatScaleAndTranslation.scale; Interpolator hotseatScaleInterpolator = builder.getInterpolator(ANIM_HOTSEAT_SCALE, diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index 3836c9fdb..08ce9c24f 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -2,8 +2,6 @@ package com.android.launcher3.allapps; import static com.android.launcher3.LauncherState.ALL_APPS_CONTENT; import static com.android.launcher3.LauncherState.ALL_APPS_HEADER_EXTRA; -import static com.android.launcher3.LauncherState.BACKGROUND_APP; -import static com.android.launcher3.LauncherState.HOTSEAT_ICONS; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.VERTICAL_SWIPE_INDICATOR; import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_ALL_APPS_FADE; @@ -134,15 +132,6 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil } else { mLauncher.getSystemUiController().updateUiState(UI_STATE_ALL_APPS, 0); } - - if ((OVERVIEW.getVisibleElements(mLauncher) & HOTSEAT_ICONS) != 0) { - // Translate hotseat with the shelf until reaching overview. - float overviewProgress = OVERVIEW.getVerticalProgress(mLauncher); - if (progress >= overviewProgress || mLauncher.isInState(BACKGROUND_APP)) { - float hotseatShift = (progress - overviewProgress) * mShiftRange; - mLauncher.getHotseat().setTranslationY(hotseatShift); - } - } } public float getProgress() { |