I am new to Android development. I managed to implement ViewPagerIndicator, and would like to know whether it is possible to use images instead of tab titles. If yes, I’d like to know how. If not, what other options do we have out there? Thanks in advance…
I am new to Android development. I managed to implement ViewPagerIndicator, and would like
Share
There is no built-in image indicator available in the Android Support package.
That being said, you can:
Step #1: Download the source for the ViewPagerIndicator library.
Step #2: Create your own
PagerIndicatorimplementation, probably based on the library’sTabPageIndicator, that usesImageViewinstead ofTextView… possibly by means of yourPagerAdapterimplementing some other interface that can expose what image to use for a given tab.Step #3: Use your
PagerIndicatorthe same way as the library indicates you can use any of the built-in ones.