Adding TaskViewSimulator for simulating taskView layout on a remote target
1. Tanslating contents of RecentsView instead of recentsView itself. When
translating, we keep the current TaskView from moving. This allows
the remoteTarget to follow an individual taskView.
2. Removing translationY in recentsView and setting the pivot instead
3. Using TaskViewSimulator for swipe handler. This allows using similar
animation creation as Launcher window animation.
Change-Id: I0b7b16c367d9d8cd8dd0ed59061e46853e2f8c83
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index bf05a24..c4eab8f 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -25,6 +25,8 @@
import static com.android.launcher3.LauncherAnimUtils.SPRING_LOADED_EXIT_DELAY;
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;
+import static com.android.launcher3.LauncherState.NO_OFFSET;
+import static com.android.launcher3.LauncherState.NO_SCALE;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.LauncherState.OVERVIEW_PEEK;
import static com.android.launcher3.Utilities.postAsyncCallback;
@@ -85,7 +87,6 @@
import androidx.annotation.VisibleForTesting;
import com.android.launcher3.DropTarget.DragObject;
-import com.android.launcher3.LauncherState.ScaleAndTranslation;
import com.android.launcher3.LauncherStateManager.StateHandler;
import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
import com.android.launcher3.allapps.AllAppsContainerView;
@@ -2698,10 +2699,6 @@
return new TouchController[] {getDragController(), new AllAppsSwipeController(this)};
}
- protected ScaleAndTranslation getOverviewScaleAndTranslationForNormalState() {
- return new ScaleAndTranslation(1.1f, 0f, 0f);
- }
-
public void useFadeOutAnimationForLauncherStart(CancellationSignal signal) { }
public void onDragLayerHierarchyChanged() { }
@@ -2724,6 +2721,14 @@
return Stream.of(APP_INFO, WIDGETS, INSTALL);
}
+
+ /**
+ * @see LauncherState#getOverviewScaleAndOffset(Launcher)
+ */
+ public float[] getNormalOverviewScaleAndOffset() {
+ return new float[] {NO_SCALE, NO_OFFSET};
+ }
+
public static Launcher getLauncher(Context context) {
return fromContext(context);
}
@@ -2735,6 +2740,7 @@
return (T) activityContext;
}
+
/**
* Callback for listening for onResume
*/