When the splash screen is used frequently in the application, a background thread is started to prepare resources for running the master program.
Android to implement the splash screen can do this:
This is the code for the splash.xml layout file [code]<linearlayout
xmlns:android= "Http://schemas.android.com/apk/res/android"
android:layout_height= "fill_parent" android:layout_width= "fill_parent" android:orientation= "vertical" >
<imageview android:layout_height= "fill_parent" android:layout_width= "Fill_parent" android:scaleType= " Fitcenter "android:src=" @drawable/splash "></ImageView>
</linearlayout>[/code]
put a ImageView load splash screen picture
Splashactivity as the main view starts [code]/** called when the activity is first created. * *
@Override
Public void OnCreate (Bundle savedinstancestate) {
super.oncreate (savedinstancestate);
Setcontentview (r.layout.splash);
Handler x = new Handler ();
x.postdelayed (New Splashhandler (), +);
}
class Splashhandler implements runnable{
Public void Run () {
startactivity (New Intent (Getapplication (), Mainactivity.class));
SplashActivity.this.finish ();
}
}[/code]
Android splash Screen Implementation