NineOldAndroids 基本用法

 ValueAnimator colorAnim = ObjectAnimator.ofInt(this, "backgroundColor", /*Red*/0xFFFF8080, /*Blue*/0xFF8080FF);  
    colorAnim.setDuration(3000);  
    colorAnim.setEvaluator(new ArgbEvaluator());  
    colorAnim.setRepeatCount(ValueAnimator.INFINITE);  
    colorAnim.setRepeatMode(ValueAnimator.REVERSE);  
    colorAnim.start();  

  

    AnimatorSet set = new AnimatorSet();  
    set.playTogether(  
        ObjectAnimator.ofFloat(myView, "rotationX", 0, 360),  
        ObjectAnimator.ofFloat(myView, "rotationY", 0, 180),  
        ObjectAnimator.ofFloat(myView, "rotation", 0, -90),  
        ObjectAnimator.ofFloat(myView, "translationX", 0, 90),  
        ObjectAnimator.ofFloat(myView, "translationY", 0, 90),  
        ObjectAnimator.ofFloat(myView, "scaleX", 1, 1.5f),  
        ObjectAnimator.ofFloat(myView, "scaleY", 1, 0.5f),  
        ObjectAnimator.ofFloat(myView, "alpha", 1, 0.25f, 1)  
    );  
    set.setDuration(5 * 1000).start();  

 

posted @ 2017-03-27 16:21  丫丫25001  阅读(1768)  评论(0编辑  收藏  举报