回答

0

您可以使用动画列表。例如:

<?xml version="1.0" encoding="utf-8"?> 

<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false"> 

    <item android:drawable="@drawable/frame1" android:duration="100" /> 
    <item android:drawable="@drawable/frame2" android:duration="100" /> 
    <item android:drawable="@drawable/frame3" android:duration="100" /> 
    <item android:drawable="@drawable/frame4" android:duration="100" /> 
    <item android:drawable="@drawable/frame5" android:duration="100" /> 

...... 

</animation-list> 

您可以将此资源关联到背景视图以及何时启动动画。

希望它可以帮助你!

+0

它会肮脏的设置为背景墙纸并运行24小时? – 2014-10-06 10:23:23

+1

我认为这是一个很好的方法来做到这一点。当你初始化动画,你应该使用这样的:ivGif.post(新的Runnable(){@Override 公共 无效的run(){ AnimationDrawable frameAnimation =(AnimationDrawable)ivGif.getBackground(); frameAnimation.start( ); frameAnimation.setOneShot(true); } }); – 2014-10-06 10:27:05

+0

是的在一个线程(Y) – 2014-10-06 10:31:19