Property Animator基本用法


ObjectAnimator anim=ObjectAnimator.ofFloat(textview, "alpha", 0f, 1f);
//ObjectAnimator anim=ObjectAnimator.ofFloat(textview, "rotate", 0, 360);
//ObjectAnimator anim=ObjectAnimator.ofFloat(textview, "y" ,textveiw.getY(),mLinearLay.getHeight()-textview.getHeight());
        anim.setDuration(3000);
     anim.start(); 
1、setRepeatCount() 设置动画回放次数,不停则设置为ObjectAnimation.INFINITE。
2、setRepeatMode() 设置动画回放方式,从头播放为ObjectAnimation.RESTART;反向从最后往前拨ObjectAnimation.REVERSE。
3、setStartDelay() 设置延迟多少毫秒才开始播放动画。
4、setInterpolator() 设置变化率与实践的关系。eg :anim.setInterpolator(new LinearInterpolator()); 
原文地址:https://www.cnblogs.com/ghimtim/p/4739743.html