I am wondering how I can do the following. I want my app background to be animated (let\'s say birds flying sort of what live wall papers look like). Is this usually done using
You can do it by using GIF image also, but first convert that GIF to frames
in xml
in java
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageView i = (ImageView)findViewById(R.id.img1);
i.setBackgroundResource(R.drawable.gif);
AnimationDrawable pro = (AnimationDrawable)i.getBackground();
pro.start();
}
}
in drawable create animation file
Hope this might help you