Boot animation watch graphics Android---Android Development example Tutorial Five

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.