Is this code I found on the web overly complicated?
final int welcomeScreenDisplay = 4000;
/** create a thread to show splash up to splash time */
Thread welcomeThread = new Thread() {
int wait = 0;
@Override
public void run() {
try {
super.run();
while (wait < welcomeScreenDisplay) {
sleep(100);
wait += 100;
}
} catch (Exception e) {
Log.v(TAG, "EXc=" + e);
} finally {
Intent i = new Intent(getBaseContext(), HomeScreen.class);
startActivity(i);
finish();
}
}
};
welcomeThread.start();
All I am looking to do is wait 4 seconds before staring the presenting a home screen.
Thanks