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 (), 2000);
}
Class Splashhandler implements runnable{
public void Run () {
StartActivity (New Intent (Getapplication (), mainactivity.class));
SplashActivity.this.finish ();
}
}[/code]
Android splash Screen Implementation