public class SplashActivity extends Activity {
Context ctx;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ctx = this;
setContentView(R.layout.activity_splash);
Thread thread = new Thread(){
public void run(){
try {
sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Intent in = new Intent(ctx,MainActivity.class);
startActivity(in);
finish();
}
};
thread.start();
}
}