When using gmail or greader, you can go from one message/news to the next/previous by issuing a swipe gesture.
I wonder how is this behavior best implemented? Is there some built-in view that does that or should I choose the source and destination views and make a transition between them?
Any code example going around for this?
Moreover, let’s say I want to swipe from a list to a second list. And when in a tablet I want both lists displayed side by side. Is this a typical fragment usage? Still, how to implement the swipe thing?
You need to look at the
ViewPager. A brief overview and sample source is available at the Developer’s blog entry Horizontal View Swiping with ViewPager.It would be better to use
Fragmentin the above use case.