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

 

相关文章:

  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-23
  • 2022-01-03
  • 2022-12-23
  • 2021-07-02
  • 2022-01-23
  • 2022-01-05
相关资源
相似解决方案