How to create a simple splash screen

Android Splash screen is the first screen that appears when the application launched. It normally used to display some animations pictures or some introductions about the applications for a limited time.

The App looks Like


public class MainActivity extends AppCompatActivity {

    //set a time of 3 sec
    private static int SPLASH_TIME_OUT = 3000;

    protected void onCreate(Bundle savedInstanceState) {

        new Handler().postDelayed(new Runnable() {
            public void run() {
                // This method will be executed once the timer is over
                // Start intent to another activity
                Intent i = new Intent(MainActivity.this, Main2Activity.class);
                // close this activity
        }, SPLASH_TIME_OUT);

Keep exploring more tutorial from this site. In case of any queries make a comment. Happy coding!!!!

Add a Comment

Your email address will not be published. Required fields are marked *