您的位置:首页 > 移动开发 > Android开发

<android5.0>之CircularReveal

2015-11-13 16:50 387 查看
[code]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;  
  }




参考资料: http://blog.csdn.net/ljx19900116/article/details/41806917
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: