1

I'm trying to do an initial tutorial in my app like in this image:

the init tutorial that I'm trying to do

Do you know the name of this feature? In order to find a tutorial for it.

Bastien Caudan
  • 4,482
  • 1
  • 17
  • 29
hlastras
  • 324
  • 5
  • 16

2 Answers2

2

You need two things

  • ViewPager
  • Custom ViewPager indicator - draw circles in canvas

You will be updating the indicator like this

mPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
  @Override
  public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {

  }

  @Override
  public void onPageSelected(int position) {
     // Update your custom view
  }

  @Override
  public void onPageScrollStateChanged(int state) {

  }
});
Bojan Kseneman
  • 15,488
  • 2
  • 54
  • 59
  • Thanks, that's what I was looking for, ViewPager. I do not know how to use canvas yet. I do this tutorial for viewPager indicator http://stackoverflow.com/questions/20586619/android-viewpager-with-bottom-dots – hlastras May 10 '15 at 15:20
1

This can be implemented by using custom ViewPager or ViewPager Adapter you have to check if item is last available and bring user to the main application. Or you can use library. This library Android WizardPager by romannurik pretended to be what are you looking for.

If you are looking for only ViewPagerIndicator there is another great library Android ViewPagerIndicator. There are a lot of examples provided there.

You can some examples of using indicators in sample application available for downloading in Maven Repository ViewPagerIndicator Maven Repo

CROSP
  • 4,499
  • 4
  • 38
  • 89