Set RecentView's translationX based on to/from state
Also make sure to reset it when setting the state without animation,
otherwise it's possible for recents to stay translated offscreen
when it's not being animated back (e.g. when swiping up after
launching an app from all apps).
Bug: 74602990
Change-Id: Ib0596c84cfb67242f436f9aba8af53556d5ca743
diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java
index 4e6bcdc..e5d8f47 100644
--- a/src/com/android/launcher3/LauncherState.java
+++ b/src/com/android/launcher3/LauncherState.java
@@ -165,6 +165,10 @@
return 1f;
}
+ public float getOverviewTranslationX(Launcher launcher) {
+ return launcher.getDragLayer().getMeasuredWidth();
+ }
+
public void onStateEnabled(Launcher launcher) {
dispatchWindowStateChanged(launcher);
}