I am making an app in android for which I need a welcome activity. I want to intent my welcome activity automatically after five seconds.Should i use a chronometer for that?
Asked
Active
Viewed 2,329 times
1
-
Use a handler with a delay of 5 seconds. You don't need a chronometer – Raghunandan Jan 24 '16 at 06:35
3 Answers
0
Splash scree is a better option for it:
Android splash screen are normally used to show user some kind of progress before the app loads completely. Some people uses splash screen just to show case their app / company logo for a couple of second.
For implementation follow this link:
http://www.androidhive.info/2013/07/how-to-implement-android-splash-screen-2/

Rohit Sharma
- 2,017
- 1
- 20
- 22
0
Show your WelcomeScreen for few seconds by adding this code to your WelcomeActivity
after setContentView
method.
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(WelcomeActivity.this, MainActivity.class);
startActivity(intent);
finish(); //This closes current activity
}
}, 4000); //It means 4 seconds
}

Shree Krishna
- 8,474
- 6
- 40
- 68
0
Splash screen is not recommended if you must have to use it.
if you are going to any start-up operation you can us splash screen.
Anyway as per your situation
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent startLandingPageActivity = new Intent(MainLauncher.this, LandingPageActivity.class);
startActivity(startLandingPageActivity);
}
}, 5000);

Manikandan Selvanathan
- 885
- 10
- 20