diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2016-07-06 15:03:59 -0700 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2016-07-06 15:03:59 -0700 |
commit | 230b2b7f441cef5c842f0c6f13a0b91db043a94c (patch) | |
tree | 4dec9cff9d1a1dc4107cff656fa0038706720287 /src/com | |
parent | 8db7d68aaccb58a646d24080d3fa7e093900e11b (diff) | |
download | android_packages_apps_Trebuchet-230b2b7f441cef5c842f0c6f13a0b91db043a94c.tar.gz android_packages_apps_Trebuchet-230b2b7f441cef5c842f0c6f13a0b91db043a94c.tar.bz2 android_packages_apps_Trebuchet-230b2b7f441cef5c842f0c6f13a0b91db043a94c.zip |
Second workspace page icons should not show up when all apps is shown in landscape.
b/29931405
> Also some method names to setTranslation -> setTranslationAndAlpha to
match its implementation.
Change-Id: Icb6ec5df8a267a9024803c70a694ea9b76e5e34d
Diffstat (limited to 'src/com')
3 files changed, 9 insertions, 8 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 9366c420f..5f0f9f5d8 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1426,8 +1426,8 @@ public class Workspace extends PagedView // TODO(adamcohen): figure out a final effect here. We may need to recommend // different effects based on device performance. On at least one relatively high-end // device I've tried, translating the launcher causes things to get quite laggy. - setWorkspaceTranslation(Direction.X, transX, alpha); - setHotseatTranslation(Direction.X, transX, alpha); + setWorkspaceTranslationAndAlpha(Direction.X, transX, alpha); + setHotseatTranslationAndAlpha(Direction.X, transX, alpha); } /** @@ -1436,7 +1436,7 @@ public class Workspace extends PagedView * @param translation the amount of shift. * @param alpha the alpha for the workspace page */ - public void setWorkspaceTranslation(Direction direction, float translation, float alpha) { + public void setWorkspaceTranslationAndAlpha(Direction direction, float translation, float alpha) { Property<View, Float> property = direction.viewProperty; mPageAlpha[direction.ordinal()] = alpha; float finalAlpha = mPageAlpha[0] * mPageAlpha[1]; @@ -1463,7 +1463,7 @@ public class Workspace extends PagedView * @param translation the amound of shift. * @param alpha the alpha for the hotseat page */ - public void setHotseatTranslation(Direction direction, float translation, float alpha) { + public void setHotseatTranslationAndAlpha(Direction direction, float translation, float alpha) { Property<View, Float> property = direction.viewProperty; property.set(mPageIndicator, translation); property.set(mLauncher.getHotseat(), translation); diff --git a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java index 2fcd73d55..a73f3ec37 100644 --- a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java +++ b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java @@ -312,7 +312,8 @@ public class WorkspaceStateTransitionAnimation { if (states.stateIsOverviewHidden) { finalAlpha = 0f; } else if(states.stateIsNormalHidden) { - finalAlpha = FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP ? 1 : 0; + finalAlpha = (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && + i == mWorkspace.getNextPage()) ? 1 : 0; } else if (states.stateIsNormal && mWorkspaceFadeInAdjacentScreens) { finalAlpha = (i == toPage || i < customPageCount) ? 1f : 0f; } else { diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index 87236aa91..0babc1a80 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -288,14 +288,14 @@ public class AllAppsTransitionController implements TouchController, VerticalPul mDecelInterpolator.getInterpolation(alpha)))); mAppsView.getContentView().setAlpha(alpha); mAppsView.setTranslationY(progress); - mWorkspace.setWorkspaceTranslation(Direction.Y, + mWorkspace.setWorkspaceTranslationAndAlpha(Direction.Y, PARALLAX_COEFFICIENT * (-mShiftRange + progress), mAccelInterpolator.getInterpolation(workspaceHotseatAlpha)); if (!mLauncher.getDeviceProfile().isVerticalBarLayout()) { - mWorkspace.setHotseatTranslation(Direction.Y, -mShiftRange + progress, + mWorkspace.setHotseatTranslationAndAlpha(Direction.Y, -mShiftRange + progress, mAccelInterpolator.getInterpolation(workspaceHotseatAlpha)); } else { - mWorkspace.setHotseatTranslation(Direction.Y, + mWorkspace.setHotseatTranslationAndAlpha(Direction.Y, PARALLAX_COEFFICIENT * (-mShiftRange + progress), mAccelInterpolator.getInterpolation(workspaceHotseatAlpha)); } |