How to create/add splash screen in android studio

How to add facebook ads in android studio

Add this line MainActivity.java
private static int SPLASH_TIME_OUT = 5000;
getSupportActionBar().hide();
 
new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {

Intent homeIntent = new Intent(MainActivity.this, HomeActivity.class);
startActivity(homeIntent);

finish();

}
}, SPLASH_TIME_OUT);

android:background="@drawable/vasa"/>

do it activity main xml

Now Create HomeActivity Java Class
so go to layout – new – empty activity
now remove hello word

Leave a Comment