Answers for "how to make splash screen in android studio"

4

splash screen android studio

///*********************declarling time here********************
    private static int SPLASH_TIME_OUT = 4000;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //This  code is used for hide the sheek bar of application************************************
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
        //***********************************************************************************************

        setContentView(R.layout.activity_main);

// this code is for splash screen ************************************************
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                Intent intent = new Intent(MainActivity.this,HomeActivity.class);
                startActivity(intent);
                finish();
            }
        },SPLASH_TIME_OUT);
    }
Posted by: Guest on June-07-2020
1

how to make splash screen in android studio

There are 2 common methods of implementing splash screens
and will find the right way:

1: Using Timers (the bad)
2: Using a Launcher Theme (The Right way)

you can check this link where you can learn to implement both splash screen
https://medium.com/geekculture/implementing-the-perfect-splash-screen-in-android-295de045a8dc
Posted by: Guest on August-11-2021

Code answers related to "how to make splash screen in android studio"

Browse Popular Code Answers by Language