Late at night is also boring, look at the old code, found that we often use the Chrysanthemum ring, the original is a frame animation, a little meaning. Suddenly feel the frame animation do something good ah, at least it seems to listen to engaging. Start on the code:
First, the layout file:
<relativelayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http// Schemas.android.com/tools " android:layout_width=" match_parent " android:layout_height=" Match_parent " android:background= "@drawable/login_bg" > <progressbar android:layout_width= "24dip" android:layout_height= "24dip" android:layout_alignparentbottom= "true" android:layout_centerhorizontal= "True" android:layout_marginbottom= "100dip" android:indeterminate= "true" Android: indeterminatedrawable= "@drawable/progress_animation"/></relativelayout>
<?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/pull_ref_pb_1 "Android:dura tion= "/> <item android:drawable=" @drawable/pull_ref_pb_2 "android:duration="/> <item android:drawable= "@drawable/pull_ref_pb_3" android:duration= "/> <item android:drawable=" @drawable/pull_ref_pb_4 "android:duration="/> <item android:drawable= "@drawable/pull_ref_pb_5" android:duration= "/> <item android:drawable=" @drawable/pull_ref_pb_6 "android:duration=" 80 "/> <item android:drawable=" @drawable/pull_ref_pb_7 "android:duration="/> <item android:drawable= "@drawable/pull_ref_pb_8" android:duration= "/> <item android:drawable=" @drawabl E/pull_ref_pb_9 "Android:duration= "/> <item android:drawable=" @drawable/pull_ref_pb_10 "android:duration="/> < Item android:drawable= "@drawable/pull_ref_pb_11" android:duration= "/> <item Android:drawa" ble= "@drawable/pull_ref_pb_12" android:duration= "/></animation-list>"
Package Com.woyou.frameanimation;import Java.util.timer;import Java.util.timertask;import android.content.Intent; Import android.os.bundle;import android.support.v7.app.actionbaractivity;/** * Daisy Ring Layout * @author Administrator * */ public class Frameactivity extends actionbaractivity {@Overrideprotected void onCreate (Bundle savedinstancestate) { Super.oncreate (savedinstancestate); Setcontentview (R.layout.login_main); Timer timer = new timer (); Timer.schedule (new TimerTask () {@Overridepublic void run () {Intent Intent = new Intent (frameacti Vity.this, Loginactivity.class); startactivity (intent); Finish ();}}, 5000);}}
It's time for him to jump over the clock.
Daisy loops (circular loading rings) that often appear in the Android UI