,QQ, every day, such as beautiful program, when opened to show a picture, and then jump to the relevant interface. This article realizes this function, actually is very simple ... .
New two Activity,loadingactivity,mainactivity, will The loadingactivity is set to Android.intent.action.MAIN. Use Timertesk, or Thread will display loadingactivity for a few seconds before jumping to Mainactivity interface.
Loadingactivity:
New Timer (). Schedule (new TimerTask () {@Overridepublic void run () {startactivity (new Intent (Loadingactivity.this, Mainactivity.class); finish (); Overridependingtransition (Android. R.anim.fade_in, Android. r.anim.fade_out);}}, 2000);
Set the style of loadingactivity
<style name= "customloading" > <item name= "Android:windowfullscreen" >true</item> < Item Name= "Android:windowcontentoverlay" > @null </item> <item name= "Android:windownotitle" >true </item> <item name= "Android:background" > @drawable/loading</item></style>
You can have it ... . Of course there are many ways to achieve, online looking for, there should be .
Source:
original articles, reproduced please specify the source: HTTP://BLOG.CSDN.NET/TANGCHENG_OK