How to Create Intro Slider for Android App

A Intro Slider or Welcome Slider can take your app into another level. A intro slider on your Android app is one of the great ways to present the most important and major features of your app. In this article I am going to show you how to add an intro slider to your app where user can swipe through few slides before getting into app.

To demonstrate what is intro slider, I will create a sample app with couple of intro slides with a next and skip buttons. Below are the step I will discuss with you in this post.

Intro slider is build by ViewPager, so you can swap screen by fingers too. In real time android app intro slider display to user one time only, But in this post I am not including one time display function. You can use share preference to show intro slider only once on app launch.

If the user launches the app on second time, he should directly go to main screen. To achieve this, we use SharedPreferences to store a boolean value indicating first time launch.

1) Create Color code for slider
2) Create Introduction Of App
3) Create four Welcome Slider layout files
4) Create ViewPager on activity_welcome.xml
5) Control slider movement and make notification bar transparent
6) Run App on device


Login & Download source code


50 days android course

Creating New Project

Create a new project name as welcomeslider in Android Studio from File ⇒ New Project. When it prompts you to select the default activity, select Empty Activity and proceed.

Create Color code for slider

First I will select four background color for slider. You can choose your favorite color that match with your app theme. It’s completely upto you how you design the intro screens considering the type of app you are building.

For this example, I am placing a big image in centre and few texts below it. At the bottom, number of dots are placed indicating the number of slides it has.For every screen we need three colors i.e background color and two dot colors when it is active / inactive.

Open colors.xml located under res ⇒ values and add the below color values. You can see after adding the colors, I have kept them into arrays array_dot_active and array_dot_inactive, so that we can load them easily in our activity.



Write Introduction of App

Open strings.xml located under res ⇒ values and add the below string values. Here I am mentioning a title and description for each slide.


Create four Welcome Slider layout xml files

Now I am going to create 4 layout file, each layout file will represent to one of the slider. So quickly create four xml layouts named welcome_side1.xml,  welcome_side2.xml,  welcome_side3.xml and  welcome_side4.xml   under res ⇒ layouts.





Create ViewPager on activity_welcome.xml

Open activity_welcome.xml and modify the code as below. Here I am adding ViewPager for slider, LinearLayout for bottom dots and two buttons for Skip and Next navigation.


Create to control slider movement

Create a new java file name as . I am going to create a PagerAdapter for the ViewPager and inflated all the layouts we created earlier.

Added click event listener to Skip and Next buttons. If next button is clicked, next slide will be shown. If Skip button is clicked, main activity will be launched directly.

Also notification bar color should be change with slider movement. So to achieve this behavior I first check API version must be great than 21 than set windows setting.


Finally open AndroidManifest.xml and make WelcomeActivity as launcher activity. So that it will be shown as the first screen in the app.


Now run the app on android device. Your Intro slider is ready to tell the story of your app.

Do you want more premium intro slider for your App?

50 day android course


Posted in andorid.

kamal bunkar

I Am Post Graduation (M.Tech. C.S.E) from VNIT, Nagpur. I Have Published Two Research Paper On International Journal. My Apps on Google Play Store- Sanyukt Parivar(Mp Police ), NOTOtag- Digital Chhindwara, The Tubby-VoiceRecognizer & More.
Contact me at

Leave a Reply

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