Android Tutorial – Splash Screen with Progress Bar

In today’s tutorial, we will create simple Android Splash Screen with Progress bar.

Splash screen is the first screen in any app. Generally, splash screen is used to notify users that the app is in process of loading. Splash screen can be plain image,  a simple screen with logo or it can have some animation. Developer can choose any of the type to create splash screen.

Let us see step by step how we can create Splash Screen.

Step 1 – Create xml layout file, activity_splash.xml. This will have a simple TextView, ImageView and ProgressBar

<?xml version=“1.0” encoding=“utf-8”?>

<RelativeLayout xmlns:android=“”








































      android:layout_marginRight=“5dp” />


Step 2 – Create Android Activity file SplashActivity. In doLoadingWork method , all the important loading tasks can be executed. While the loading process is in progress, the current thread performs sleep.

public class SplashActivity extends AppCompatActivity {

 private ProgressBar progressBar;


  public void onCreate(Bundle savedInstanceState) {


      // Show the splash screen


      progressBar = (ProgressBar) findViewById(;

      // Start lengthy operation in a background thread

      new Thread(new Runnable() {

          public void run() {


              // add your code to redirect to main app screen





  // Perform loading tasks in this method, also set the progress bar

  private void doLoadingWork() {

      for (int progress=0; progress<50; progress+=10) {

          try {



          } catch (Exception e) {

              e.printStackTrace(); }




Splash Screen with Progress Bar

Leave a Reply

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