Skill Making

Always Increase Your Knowledge

How to Create Splash Screen in Android

How to Create Splash Screen in Android





If you are an android developer. And also want to learn that how to create splash screen in Android then you should read this article till end. Here you can get all information with coding about splash screen in android.

If you want to create an android app who has also Splash screen then you should read this article which is given below. You need two activities. The fist one is used to create a splash screen and the second one is used to create a activity_main.xml

Step 1:

Create two activities. First one is activity_main.xml and the second one is activity_second.xml.

Step 2:

Copy an image and paste into a drawable folder.

Step 3:

Set the background image in activity_main.xml.



Step 4:

Open MainActivity.java and write this code.

import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                Intent i=new Intent(MainActivity.this,Second.class);
                startActivity(i);
            }
        },3000);
    }
}

Step 5:

Run this app in your mobile.



Output:

splash screen in android

Note: Random Number Generator

AutoComplete Text View

Alert Dialog Box in Android

Leave a Reply

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

Skill Making © 2018 Frontier Theme