Jump to new activity with Android L reveal Effect
- 实现效果
-
核心代码
public void startFromLocation(int[] tapLocationOnScreen) { changeState(STATE_FILL_STARTED); startLocationX = tapLocationOnScreen[0]; startLocationY = tapLocationOnScreen[1]; revealAnimator = ObjectAnimator.ofInt(this, "currentRadius", 0, getWidth() + getHeight()).setDuration(FILL_TIME); revealAnimator.setInterpolator(INTERPOLATOR); revealAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { changeState(STATE_FINISHED); } }); revealAnimator.start(); }