Originally Posted by Alwaysup
Thanks for the styling advice, I've now styled as I wanted.
But when I do viewPager.setCurrentItem(5);
(I've ten items) it stays on the middle and I'm not able to select a other day. (I call it in onPageScrolled
). Is it possible that the item stays in the middle even if I scroll (just as the example)?
Ah OK I see, as you scroll the selected one needs to be in the middle...
From memory I thought it did that by default, with the exception that if you're at either end of the list it won't scroll the screen unnecessarily.
Do you see something different ?
Looking at the ViewPagerIndicator test app (G. Play) if you go to Tabs/Default and scroll from Albums -> Songs, the selection will stay in the middle. Other movements won't since they are already on the screen.
In your case it might be possible to increase the number of days displayed (from 10 -> say, 20) to produce the same effect ?