Change overview animation to scale instead of translationX
As you swipe up to overview from home, workspace scales down and fades out as before,
and now recents scales down from 1.2f on top of it. The interpolators are set such
that the workspace animation is seen before the recents animation. Also, we don't
scale down all of recents, only the visible pages (current and adjacent).
Change-Id: I5f8bfe8cafeaa41d26873c63549735d7bdff2bce
diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java
index fdb6f48..4697b82 100644
--- a/src/com/android/launcher3/LauncherState.java
+++ b/src/com/android/launcher3/LauncherState.java
@@ -181,12 +181,12 @@
}
/**
- * Returns 2 floats designating how much to translate overview:
- * X factor is based on width, e.g. 0 is fully onscreen and 1 is fully offscreen
- * Y factor is based on padding, e.g. 0 is top aligned and 0.5 is centered vertically
+ * Returns 2 floats designating how to transition overview:
+ * scale for the current and adjacent pages
+ * translationY factor where 0 is top aligned and 0.5 is centered vertically
*/
- public float[] getOverviewTranslationFactor(Launcher launcher) {
- return new float[] {1f, 0f};
+ public float[] getOverviewScaleAndTranslationYFactor(Launcher launcher) {
+ return new float[] {1.2f, 0.2f};
}
public void onStateEnabled(Launcher launcher) {