I am using http://viewpagerindicator.com/ library. I would like to create a TitlePageIndicator like the below image on Gmail app:

I exactly want to achieve the same thing where first title is ‘Newer’, last title is ‘Older’ and center title is ‘[page position] of [total pages]’. Is it possible to achieve this with the library I am using or should I modify it?
I had the same issue. Solved like this with the help from Matthieu. Based this on the samples that come with the ViewPagerIndicator.
Basically listening when the page change and change the adapter to give a different page title depending on the current position. The code given below simply works for me.
If you have those samples working and you just replace those two files, then try this sample
Changed the code for TestFragmentAdapter like this:
the code for SampleTitlesDefault like this (added the OnPageChangeListener)