Android ImageView添加动画

方法1:
 
animation.xml
 
"http://schemas.android.com/apk/res/android"
     android:oneshot= "false" >
     "500" android:drawable= "@drawable/broadcast_actionbar_invisble" />
     "500" android:drawable= "@drawable/broadcast_actionbar_visible" />
 
 
  image.setBackgroundResource(R.anim.animation);
 
 
方法2:
 
image.setImageResource(R.anim.animation);
mAnimationDrawable = (AnimationDrawable) mProgressBar
                         .getDrawable();
                 mAnimationDrawable.start();
 
mAnimationDrawable.stop();

 

转载于:https://www.cnblogs.com/bing11/p/3310400.html

你可能感兴趣的:(Android ImageView添加动画)