Jainendra
Jainendra

Reputation: 25143

How to use viewpagerindicator with ViewPager in Android?

I want to use viewpagerindicator with ViewPager in my android application. I've created ViewPager, now I want to display the title of each page in the ViewPager. After reading this I came to know that viewpagerindicator will be helpful. Now the problem is that how can I use this project in my project. I tried adding from properties --> java build path --> Libraries --> add external class folders but it doesn't helped.
I also tried to compile the libraries downloaded from http://viewpagerindicator.com/, but that gives me a bunch of The method setViewPager(ViewPager) of type LinePageIndicator must override a superclass method type errors.

I want to use TabPageIndicator and TitlePageIndicator from viewpagerindicator project in my application as described here.

Upvotes: 2

Views: 11664

Answers (1)

Vincent Mimoun-Prat
Vincent Mimoun-Prat

Reputation: 28541

  1. Download the source code of that project
  2. In your Eclipse workspace: File > New > Project... > Android > Android project from existing code
  3. As the location choose viewpagerindicator/library (this should create the library project in your workspace)
  4. Right click on your project > Properties...
  5. Android > Library > Add...
  6. Select the viewpagerindicator project you have created with previous steps.
  7. Follow the instructions about how to include a view pager indicator in your layouts as on http://viewpagerindicator.com/#usage

Upvotes: 1

Related Questions