final Resources res = mLauncher.getResources();
final boolean material = Utilities.ATLEAST_LOLLIPOP;
final int revealDuration = res.getInteger(R.integer.config_overlayRevealTime);
+ final int revealDurationSlide = res.getInteger(R.integer.config_overlaySlideRevealTime);
+
final int itemsAlphaStagger = res.getInteger(R.integer.config_overlayItemsAlphaStagger);
final View fromView = mLauncher.getWorkspace();
pCb.onTransitionComplete();
}
});
- mAllAppsController.animateToAllApps(animation, revealDuration);
+ mAllAppsController.animateToAllApps(animation, revealDurationSlide);
dispatchOnLauncherTransitionPrepare(fromView, animated, false);
dispatchOnLauncherTransitionPrepare(toView, animated, false);
final Resources res = mLauncher.getResources();
final boolean material = Utilities.ATLEAST_LOLLIPOP;
final int revealDuration = res.getInteger(R.integer.config_overlayRevealTime);
+ final int revealDurationSlide = res.getInteger(R.integer.config_overlaySlideRevealTime);
final int itemsAlphaStagger =
res.getInteger(R.integer.config_overlayItemsAlphaStagger);
}
});
- mAllAppsController.animateToWorkspace(animation, revealDuration);
+ mAllAppsController.animateToWorkspace(animation, revealDurationSlide);
// Dispatch the prepare transition signal
dispatchOnLauncherTransitionPrepare(fromView, animated, multiplePagesVisible);
import android.animation.AnimatorSet;
import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
+import android.support.v4.view.animation.FastOutSlowInInterpolator;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
private static final boolean DBG = false;
private final Interpolator mAccelInterpolator = new AccelerateInterpolator(2f);
- private final Interpolator mDecelInterpolator = new DecelerateInterpolator(1f);
+ private final Interpolator mFastOutSlowInInterpolator = new FastOutSlowInInterpolator();
+ private final Interpolator mScrollInterpolator = new PagedView.ScrollInterpolator();
private static final float ANIMATION_DURATION = 1200;
public boolean isTransitioning() {
return mDetector.isDraggingOrSettling();
}
+
/**
* @param start {@code true} if start of new drag.
*/
}
public void animateToAllApps(AnimatorSet animationOut, long duration) {
+ Interpolator interpolator;
if (animationOut == null) {
return;
}
preparePull(true);
mAnimationDuration = duration;
mShiftStart = mAppsView.getTranslationY();
+ interpolator = mFastOutSlowInInterpolator;
+ } else {
+ interpolator = mScrollInterpolator;
}
final float fromAllAppsTop = mAppsView.getTranslationY();
ObjectAnimator driftAndAlpha = ObjectAnimator.ofFloat(this, "progress",
fromAllAppsTop / mShiftRange, 0f);
driftAndAlpha.setDuration(mAnimationDuration);
- driftAndAlpha.setInterpolator(new PagedView.ScrollInterpolator());
+ driftAndAlpha.setInterpolator(interpolator);
animationOut.play(driftAndAlpha);
animationOut.addListener(new AnimatorListenerAdapter() {
if (animationOut == null) {
return;
}
+ Interpolator interpolator;
if (mDetector.isIdleState()) {
preparePull(true);
mAnimationDuration = duration;
mShiftStart = mAppsView.getTranslationY();
+ interpolator = mFastOutSlowInInterpolator;
+ } else {
+ interpolator = mScrollInterpolator;
}
final float fromAllAppsTop = mAppsView.getTranslationY();
ObjectAnimator driftAndAlpha = ObjectAnimator.ofFloat(this, "progress",
fromAllAppsTop / mShiftRange, 1f);
driftAndAlpha.setDuration(mAnimationDuration);
- driftAndAlpha.setInterpolator(new PagedView.ScrollInterpolator());
+ driftAndAlpha.setInterpolator(interpolator);
animationOut.play(driftAndAlpha);
animationOut.addListener(new AnimatorListenerAdapter() {