Reputation: 36035
I noticed in the design document that was released a short while ago, they encourage the use of scrollable tabs. I managed to implement this system pretty easily using a FragmentPagerAdapter
, but now I'm having trouble with the tabs themselves.
I've noticed the most common thing people have done is use static tabs at the top that active as the user scrolls down. I can get that to work, but I'm talking about the dynamic tabs that the Marketplace and Google+ tabs use. They shift down as the user scrolls through. It seems they animate independently from the rest of the pages as well. I can not seem to find a widget that does this, and I've also noticed that it's mostly Google apps that use it.
Is there a standard tab widget that uses this that I am overlooking? If not is there a standard way of implementing it?
Currently, I am developing an app for API 12 (Android 3.1).
Upvotes: 0
Views: 222
Reputation: 8828
When you say "they shift down", do you mean the text at the top of the market, which swipes left and right? If that's what you want, Jake Wharton has made a library called ViewPagerIndicator, which can make tabs almost exactly as the Market does.
Upvotes: 3