Animate to the workspace card when transitioning from overview to home
Change-Id: Ib2c2288fd935f678a5c7a354be09c6d852d86b41
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 5ed722c..87595d9 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -68,7 +68,7 @@
private static final int MIN_LENGTH_FOR_FLING = 25;
public static final int PAGE_SNAP_ANIMATION_DURATION = 750;
- protected static final int SLOW_PAGE_SNAP_ANIMATION_DURATION = 950;
+ public static final int SLOW_PAGE_SNAP_ANIMATION_DURATION = 950;
// OverScroll constants
private final static int OVERSCROLL_PAGE_SNAP_ANIMATION_DURATION = 270;
@@ -1690,7 +1690,7 @@
snapToPage(whichPage, PAGE_SNAP_ANIMATION_DURATION, true, null);
}
- protected void snapToPage(int whichPage, int duration) {
+ public void snapToPage(int whichPage, int duration) {
snapToPage(whichPage, duration, false, null);
}
diff --git a/src/com/android/launcher3/anim/AnimatorSetBuilder.java b/src/com/android/launcher3/anim/AnimatorSetBuilder.java
index 63e67ff..7cd9651 100644
--- a/src/com/android/launcher3/anim/AnimatorSetBuilder.java
+++ b/src/com/android/launcher3/anim/AnimatorSetBuilder.java
@@ -28,6 +28,7 @@
public class AnimatorSetBuilder {
protected final ArrayList<Animator> mAnims = new ArrayList<>();
+ private long mStartDelay = 0;
/**
* Associates a tag with all the animations added after this call.
@@ -38,9 +39,14 @@
mAnims.add(anim);
}
+ public void setStartDelay(long startDelay) {
+ mStartDelay = startDelay;
+ }
+
public AnimatorSet build() {
AnimatorSet anim = LauncherAnimUtils.createAnimatorSet();
anim.playTogether(mAnims);
+ anim.setStartDelay(mStartDelay);
return anim;
}
}