There are many pictures under the drawable to
1<?xml version= "1.0" encoding= "Utf-8"?>2<animation-list android:oneshot= "false"3Xmlns:android= "Http://schemas.android.com/apk/res/android" >4<item android:duration= "android:drawable=" @drawable/waiting_001 "/>5<item android:duration= "android:drawable=" @drawable/waiting_002 "/>6<item android:duration= "android:drawable=" @drawable/waiting_003 "/>7<item android:duration= "android:drawable=" @drawable/waiting_004 "/>8<item android:duration= "android:drawable=" @drawable/waiting_005 "/>9<item android:duration= "android:drawable=" @drawable/waiting_006 "/>Ten<item android:duration= "android:drawable=" @drawable/waiting_007 "/> One<item android:duration= "android:drawable=" @drawable/waiting_008 "/> A<item android:duration= "android:drawable=" @drawable/waiting_009 "/> -<item android:duration= "android:drawable=" @drawable/waiting_010 "/> -<item android:duration= "android:drawable=" @drawable/waiting_011 "/> the<item android:duration= "android:drawable=" @drawable/waiting_012 "/> -<item android:duration= "android:drawable=" @drawable/waiting_013 "/> -<item android:duration= "android:drawable=" @drawable/waiting_014 "/> -<item android:duration= "android:drawable=" @drawable/waiting_015 "/> +<item android:duration= "android:drawable=" @drawable/waiting_016 "/> -<item android:duration= "android:drawable=" @drawable/waiting_017 "/> +<item android:duration= "android:drawable=" @drawable/waiting_018 "/> A<item android:duration= "android:drawable=" @drawable/waiting_019 "/> at<item android:duration= "android:drawable=" @drawable/waiting_020 "/> -<item android:duration= "android:drawable=" @drawable/waiting_021 "/> -<item android:duration= "android:drawable=" @drawable/waiting_022 "/> -<item android:duration= "android:drawable=" @drawable/waiting_023 "/> -<item android:duration= "android:drawable=" @drawable/waiting_024 "/> -<item android:duration= "android:drawable=" @drawable/waiting_025 "/> in<item android:duration= "android:drawable=" @drawable/waiting_026 "/> -<item android:duration= "android:drawable=" @drawable/waiting_027 "/> to<item android:duration= "android:drawable=" @drawable/waiting_028 "/> +<item android:duration= "android:drawable=" @drawable/waiting_029 "/> -<item android:duration= "android:drawable=" @drawable/waiting_030 "/> the<item android:duration= "android:drawable=" @drawable/waiting_031 "/> *<item android:duration= "android:drawable=" @drawable/waiting_032 "/> $<item android:duration= "android:drawable=" @drawable/waiting_033 "/>Panax Notoginseng<item android:duration= "android:drawable=" @drawable/waiting_034 "/> -<item android:duration= "android:drawable=" @drawable/waiting_035 "/> the<item android:duration= "android:drawable=" @drawable/waiting_036 "/> +<item android:duration= "android:drawable=" @drawable/waiting_037 "/> A<item android:duration= "android:drawable=" @drawable/waiting_038 "/> the<item android:duration= "android:drawable=" @drawable/waiting_039 "/> +<item android:duration= "android:drawable=" @drawable/waiting_040 "/> -<item android:duration= "android:drawable=" @drawable/waiting_041 "/> $<item android:duration= "android:drawable=" @drawable/waiting_042 "/> $<item android:duration= "android:drawable=" @drawable/waiting_043 "/> -<item android:duration= "android:drawable=" @drawable/waiting_044 "/> -<item android:duration= "android:drawable=" @drawable/waiting_045 "/> the<item android:duration= "android:drawable=" @drawable/waiting_046 "/> -<item android:duration= "android:drawable=" @drawable/waiting_047 "/>Wuyi<item android:duration= "android:drawable=" @drawable/waiting_048 "/> the<item android:duration= "android:drawable=" @drawable/waiting_049 "/> -<item android:duration= "android:drawable=" @drawable/waiting_050 "/> Wu<item android:duration= "android:drawable=" @drawable/waiting_051 "/> -<item android:duration= "android:drawable=" @drawable/waiting_052 "/> About<item android:duration= "android:drawable=" @drawable/waiting_053 "/> $<item android:duration= "android:drawable=" @drawable/waiting_054 "/> -<item android:duration= "android:drawable=" @drawable/waiting_055 "/> -<item android:duration= "android:drawable=" @drawable/waiting_056 "/> -<item android:duration= "android:drawable=" @drawable/waiting_057 "/> A<item android:duration= "android:drawable=" @drawable/waiting_058 "/> +<item android:duration= "android:drawable=" @drawable/waiting_059 "/> the<item android:duration= "android:drawable=" @drawable/waiting_060 "/> -<item android:duration= "android:drawable=" @drawable/waiting_061 "/> $<item android:duration= "android:drawable=" @drawable/waiting_062 "/> the<item android:duration= "android:drawable=" @drawable/waiting_063 "/> the<item android:duration= "android:drawable=" @drawable/waiting_064 "/> the<item android:duration= "android:drawable=" @drawable/waiting_065 "/> the</animation-list>
Animation_loading.xml
Composing frame animations
1 PackageCom.example.animation1;2 3 Importandroid.app.Activity;4 Importandroid.graphics.drawable.AnimationDrawable;5 ImportAndroid.os.Bundle;6 ImportAndroid.view.Menu;7 Importandroid.view.animation.Animation;8 ImportAndroid.widget.ImageView;9 Ten Public classMainactivityextendsActivity { One A PrivateImageView IV; - @Override - protected voidonCreate (Bundle savedinstancestate) { the Super. OnCreate (savedinstancestate); - Setcontentview (r.layout.activity_main); - -iv=(ImageView) Findviewbyid (R.ID.IV); +Animationdrawable anim=(animationdrawable) iv.getbackground (); - Anim.start (); + } A at}
Mainactivity.java
UI Animation Pivotx Pivoty Pivotx property is the start position of the animation relative to the x-coordinate of the object
Anim.setrepeatmode (Animation.reverse);
Anim.setrepeatcount (Animation.infinite);
Animation Alpha,ping,xuan,suof;
Alpha=animationutils.loadanimation (this, R.layout.toumingdu);
Ping=animationutils.loadanimation (this, R.layout.pingyi);
Xuan=animationutils.loadanimation (this, R.layout.xuanzhuan);
Suof=animationutils.loadanimation (this, r.layout.scale);
Tv1.startanimation (Alpha);
Tv2.startanimation (ping);
Tv3.startanimation (Xuan);
Tv4.startanimation (Suof);
Soundpool soundpool2;
Soundpool2=new Soundpool (5,audiomanager.stream_system, 0);
Soundmap.put (1, Soundpool2.load (this, R.raw.anjian, 1));
Soundpool2.play (Soundmap.get (1), 1,1,0,0,1);
Frame animations continuously play multiple picture animations and UI animations Soundpool