Android Instance Illustration Tutorial Directory
http://blog.csdn.net/wyx100/article/details/45061407
In the "development of a new Android interface, interface jump to see the graphics Android---Android Development example tutorial three or four" based on the completion of the boot animation, the image of the boot interface, in 5.5 seconds gradually disappeared, showing the main interface.
Modify only the following sections of the code in Startactivity.java
Startactivity.java Source Code
Package Com.example.helloword;import Android.app.activity;import Android.content.intent;import android.os.Bundle; Import Android.os.handler;import Android.view.animation.alphaanimation;import Android.view.animation.AnimationSet Import Android.widget.imageview;public class StartActivity extends activity {/** Called when the activity is first create d. */private final int splash_display_lenght = 3000; Delay three seconds private ImageView image=null; @Overridepublic void OnCreate (Bundle savedinstancestate) {super.oncreate (Savedin Stancestate); Setcontentview (R.layout.start); Image= (ImageView) Findviewbyid (R.ID.IMAGEVIEW1); Animationset animationset=new Animationset (true); Alphaanimation alphaanimation=new alphaanimation (1, 0);//alphaanimation (1, 0) the picture gradually becomes transparent, 1 refers to the transparency of 0%,0 refers to the transparency 100% Alphaanima Tion.setduration (5500); Animationset.addanimation (alphaanimation); Image.startanimation (Animationset); New Handler (). postdelayed (New Runnable () {@OverRide public void Run () {Intent mainintent = new Intent (startactivity.this,mainactivity.class);//Interface Jump Definition StartActivity.this.startActivity (mainintent); Start interface Jump StartActivity.this.finish (); Interface after the jump is complete, eliminate the interface one}}, Splash_display_lenght); The interface shows the length of a time}}
Boot animation watch graphics Android---Android Development example Tutorial Five