- Type 1 No RUN UI
Threadtimer = newThread(){
publicvoidrun(){
try{
sleep(1000);
} catch (Exceptione) {
e.printStackTrace();
} finally {
Intentintent = newIntent(getApplicationContext(), SplashScreenExerSecond.class);
startActivity(intent);
SplashScreenExerFirst.this.finish();
}
}
};
timer.start();- Type 2 RUN UI
newHandler().postDelayed(newRunnable() {
@Overridepublicvoidrun() {
///action
}
}, 4000);Copyright 2020 M. Fadli Zein