Android Post Installation Wizard Using ViewPager

In many applications we download from Google Play Store, they show user wizard sort of walkthrough or asking user to accept license and signup etc for the first time after installation. User is shown current page on screen with strip of circled at bottom highlighted for current page. We will create an Android Application Post Installation Wizard Using ViewPager and add functionality of page indicator using circle strip at the bottom.


android.support.v4.view.ViewPager allows the user to flip left and right through pages of data. We need to set adapter for views to be shown as pages. We will use FragmentPagerAdapter for our ViewPager which will have Fragment as its data item. As soon as Page of ViewPager is changed, we will update page indicator.

Sample Android Application with ViewPagerIndicator

 

[su_button url=”https://github.com/androidsrc/ViewPagerIndicator” target=”blank” style=”stroked” background=”#51d461" color=”#ffffff” size=”6" center=”yes” radius=”0" icon=”icon: arrow-circle-o-down”]Download Complete Source Code[/su_b[/su_button]p> 

[su_yo[su_youtube url=”https://www.youtube.com/watch?v=nX0l6MVdEuw”]p> 

In this tutorial, I have not covered sign in with Facebook and Google+. If interested, you would like to check our posts for social login integration.

Facebook login in Android apps – Using latest SDK

Integrating Google Plus Sign In into your Android Application

1. Create a new Android Application Project with com.androidsrc.viewpagerindicator as package name.

2. Preparing Application Manifest File

I have set theme as no title bar and fullscreen for Wizard. If you don’t want title war to appear, set android:theme attribute for your wizard activity as @android:style/Theme.NoTitleBar.Fullscreen.

You may also like...

6 Responses

  1. Jose Luis Crisostomo Sanchez says:

    Hello, I have a question, I would like to use your source but when I tried to call an activity and i Failed, so could you explain me how could I do this? Regards

    • AndroidSRC . says:

      Please share the logs so that we can find the problem.

      • Jose Luis Crisostomo Sanchez says:

        Thanks for your reply, and I’m a newbie in android development so I cannot understand where I have to put my intent to call the other activity, so Into my log file just say “could’nt to find inicio() ‘ and Inicio() is my class to catch when the user push the “let’s go button”

        page 4 .xml

        • AndroidSRC . says:

          just put this function in Activity sub class in which you have inflated that layout. It will go like this.
          public void inicio(View v){
          //perform action here
          }

  2. tushar says:

    my WIZARD_PAGES_COUNT page goes in both case 1 and 2 at same time please help

  3. tushar says:

    03-04 17:47:01.925 13285-13285/com.example.aam.firstscreen D/abhi: wizard_page_position in method fragment::0

    03-04 17:47:01.935 13285-13285/com.example.aam.firstscreen D/abhi: wizard_page_position in method fragment::1

Leave a Reply

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