之CircularReveal

public Animator createAnimation(View v, Boolean isFirst) {  

      Animator animator;  

      if (isFirst) {  
          animator = ViewAnimationUtils.createCircularReveal(  
                  v,// 操作的视图 
                  0,// 动画开始的中心点X 
                  0,// 动画开始的中心点Y 
                  v.getWidth(),// 动画开始半径 
                  0);// 动画结束半径 
      } else {  
          animator = ViewAnimationUtils.createCircularReveal(  
                  v,// 操作的视图 
                  0,// 动画开始的中心点X 
                  0,// 动画开始的中心点Y 
                  0,// 动画开始半径 
                  v.getWidth());// 动画结束半径 
      }  

      animator.setInterpolator(new DecelerateInterpolator());  
      animator.setDuration(500);  
      return animator;  
  }  
  static boolean isFirst = false;  
  @Override  
  public void onClick(View v) {  
      createAnimation(myView, isFirst).start();  
      isFirst = !isFirst;  
  }  

<android5.0>之CircularReveal_第1张图片

参考资料: http://blog.csdn.net/ljx19900116/article/details/41806917

你可能感兴趣的:(android)