Skip to main content

Android Splash Screen Tutorial Using New Android Studio

Many popular Android Apps such as Skype, Facebook, Adobe Reader, 500px, Dropbox etc.,  uses splash screen to display their logo. Most Android Apps uses Android Splash Screen before launching application Activity. Android splash screen is used to display a logo or brand for an app. In this article we are going to discuss about implementing an Android Splash Screen in a simple manner.


  1. Click on File > New Project.
  2. Next, define Application Name and Minimum SDK and hit Next
  3. Select Blank Activity and Hit Next.
  4. Activity name as  SplashScreen
  5. Hit  Finish
This creates a simple Hello world Project for which we will implement android Splash screen. With Activity name SplashScreen

Create new activity, Select it as blank activity. Name it as Second activity


Open SplashScreen.java


package com.example.test;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class SplashScreen extends Activity {
    private Intent myintent;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splashscreen);

        myintent = new Intent(this, Secondactivity.class);
       new Thread(new Runnable() {
        public void run() {
            try {
                Thread.sleep(6000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            startActivity(myintent);
            finish();
        }
      }).start();
    
    }

}
 
 
you can design your splashscreen in splashscreen.xml 
When opening app it shows splash screen for 6 seconds,
after that opens second activity. 

Comments

Popular posts from this blog

Your first Android Studio mobile app

The quickest way to get to know Android Studio is to use it to develop an app. We'll start with a variation on the "Hello, World" application: a little mobile app that displays a "Welcome to Android" message. Starting a new project From our setup so far, you should still have Android Studio running with the Welcome to Android Studio dialog box. From here, click Start a new Android Studio project. Android Studio will respond with the Create New Project dialog box shown in Figure Enter myfirst app (Welcome to Android) as the application name and firstapp.com as the company domain name. You should then see C:\Users\firstapp\AndroidStudioProjects\myfirst app as the project location. Click Next to select your target devices. Android Studio lets you select form factors , or categories of target devices, for every app you create. I would have preferred to keep the default API 15: Android 4.0.3 (IceCreamSandwich) minimum SDK setting (under Phone a...

Installation android studio

Android Studio is the official IDE for android application development.It works based on IntelliJ IDEA , You can download the latest version of android studio from Android Studio 2.2 Download , If you are new to installing Android Studio on windows,you will find a file, which is named as android-studio-bundle-143.3101438-windows.exe .So just download and run on windows machine according to android studio wizard guideline. If you are installing Android Studio on Mac or Linux, You can download the latest version from Android Studio Mac Download ,or Android Studio Linux Download , check the instructions provided along with the downloaded file for Mac OS and Linux. This tutorial will consider that you are going to setup your environment on Windows machine having Windows 8.1 operating system. Installing android studio