Package edu.hpu.init;
import android.app.Activity;
import android.content.Intent;
import Android.os.Bundle;
import Android.os.Handler;
import EDU.HPU.LOGIC.R;
import edu.hpu.viewpager.MyViewPagerActivity;
Public class extends Activity {
Private Static Final long delaytime = 1000;
@Override
protected void onCreate (Bundle savedinstancestate) {
Super. OnCreate (savedinstancestate);
Setcontentview (R.layout.splash);
New Handler (). postdelayed (new Runnable () {
StartActivity must be added, otherwise the Runable interface is the default
Public void Run () {
GoHome ();
}
}, Delaytime);
}
Private void GoHome () {
New Intent (This, myviewpageractivity. Class);
StartActivity (Intent);
this. Finish ();
}
}
<!--Welcome Screen--
< Relativelayout xmlns:android="Http://schemas.android.com/apk/res/android"
xmlns:tools="Http://schemas.android.com/tools"
android:layout_width="Match_parent"
android:layout_height="Match_parent"
Tools:Context=". StartActivity ">
< ImageView
android:layout_width="Match_parent"
android:layout_height="Match_parent"
android:adjustviewbounds="true"
Android:background="@drawable/logo"
android:scaletype="Centercrop"/>
</ Relativelayout >