Create an animated XML file first, such as the following
<?
XML version= "1.0" encoding= "Utf-8"?>
<animation-list xmlns:android= "Http://schemas.android.com"
Android:oneshot= "false" ><!--set to False is the animation does not loop play--! >
<item
android:drawable= "@drawable/loading_01"
android:duration= "></item>"
<item
android:drawable= "@drawable/loading_02"
android:duration= "></item>"
<item
android:drawable= "@darwable/loading_03"
android:duration= "></item>"
</animation-list>
This is the animation effect, assuming that a imageview set up this animation effect will appear every picture in turn to form an animation
Then we'll look at the class that loads the animation
mloadingimagebiew= (ImageView) Findviewbyid (R.id.loadingimageview);
Animationdrawable animationdrawable= (animationdrawable) this.getresources (). Getdrawable (R.drawable.loading_ animation_drawable);
Mloadingimageview.setimagedrawable (animationdrawable);
Animationdrawable.start ();
Animated effect turned on
After the animation has run, we want to jump to the next interface to see the following:
New Thread (New Runnable () {
public void Run () {
Handler.post (New Runnable () {
public void Run () {
StartActivity (New Intent (Mainactivity.this,userlistactivity.class));
Finish ();
}
);
});
Android waiting for rotation circle animation