1

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?

Saif Arsalan
  • 359
  • 1
  • 3
  • 7

3 Answers3

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);