In this tutorial you will get android splash screen example.
Splash screen is a simple screen or activity used to display some progress when application is launched. Some developers use splash screen to just show company logo or to engage user while some important data in loaded in background. After few seconds or minutes splash screen is stopped and any other activity is started.
Below I have given an example of splash screen of Facebook app. This screen appears for few seconds when app is launched.
Android Splash Screen Example
Create new project with a blank activity with name Splash. Use package name as com.splash. Now create another blank activity with name MainActivity, it is the activity that will open after splash screen.
Note: Make sure Splash is launcher activity.
Copy any image with name logo in res/drawable folder. We will use this logo to show on splash screen.
Now add following codes in respective files.
I have used Thread class and sleep() method to keep splash screen for 10 seconds. You can change the time according to you. After that Intent class is used to open MainActivity.