Esempio n. 1
0
  private void runEnterAnim() {

    final Rect bounds = new Rect();
    revealFrameLayout.getHitRect(bounds);

    ListActivity.this.revealFrameLayout.setLayerType(View.LAYER_TYPE_HARDWARE, null);

    SupportAnimator revealAnimator =
        ViewAnimationUtils.createCircularReveal(
            revealFrameLayout.getChildAt(0),
            0,
            bounds.left,
            0,
            Utils.pythagorean(bounds.width(), bounds.height()));
    revealAnimator.setDuration(Constants.MILLISECONDS_400);
    revealAnimator.setInterpolator(new AccelerateInterpolator());
    revealAnimator.addListener(
        new SupportAnimator.SimpleAnimatorListener() {
          @Override
          public void onAnimationEnd() {
            ListActivity.this.revealFrameLayout.setLayerType(View.LAYER_TYPE_NONE, null);
            listPresenter.loadData();
          }
        });
    revealAnimator.start();
  }