Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8530789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:19:56+00:00 2026-06-11T09:19:56+00:00

I need a splash screen for my application. Tried creating an activity having the

  • 0

I need a splash screen for my application.
Tried creating an activity having the image for my splash screen; and tried using for loop and the Timer class for introducing a time delay. But it din’t work that way.
Am I doing it wrong; if yes, what is the right way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:19:57+00:00Added an answer on June 11, 2026 at 9:19 am

    The above solutions are good, but what if the user presses the back-key (and closes your app) before the splash-delay is over.
    The app will probably still open the next Activity, which isn’t really user-friendly.

    That’s why I work with a custom Handler, and remove any pending messages in onDestroy().

    public class SplashActivity extends Activity
    {
        private final static int MSG_CONTINUE = 1234;
        private final static long DELAY = 2000;
    
        @Override
        protected void onCreate(Bundle args)
        {
            super.onCreate(args);
            setContentView(R.layout.activity_splash);
    
            mHandler.sendEmptyMessageDelayed(MSG_CONTINUE, DELAY);
        }
    
        @Override
        protected void onDestroy()
        {
            mHandler.removeMessages( MSG_CONTINUE );    
            super.onDestroy();
        }
    
        private void _continue()
        {
            startActivity(new Intent(this, SomeOtherActivity.class));
            finish();
        }
    
        private final Handler mHandler = new Handler()
        {
            public void handleMessage(android.os.Message msg)
            {
                switch(msg.what){
                    case MSG_CONTINUE:
                        _continue();
                        break;
                }
            }
        };
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to show Splash Screen with Image & progress bar. In my application
I created my splash screen using the method mentioned here: http://delphi.about.com/od/formsdialogs/a/splashscreen.htm I need to
I am using splash screen for my application when it starts begining and I
I need to show splash screen on my application start for few seconds. Does
In my app, I need to display a splash screen.I collect the image from
I am creating a splash screen for an application that is built in html5
I need to know the optimal size for the splash screen image. Since different
I want to make a splash screen in my application, for that i need
I am making a splash screen and need help closing this activity so if
I actually try to add a Splash Screen to my WPF application. It is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.