concept ViewPager in category android

This is an excerpt from Manning's book 50 Android Hacks.
Depending on your needs, you can also try doing the same thing with the ViewPager class. Your Adapter would return Fragments instead of views.
With the release of Compatibility Package revision 3, the ViewPager class was made available. If you’ve never used the ViewPager class, you should know it’s an implementation of a horizontal view swiper. What’s possible with the ViewPager class? You can create any kind of application that requires paginated views. The best part is that it works like an AdapterView, meaning that you use it as you’d use a ListView —simple.
Imagine you want to create a magazine-like application. Although the ViewPager class is an excellent ally to help you achieve this, it’s hard to handle different orientation changes depending on the page. In this hack I’ll show you how to use the ViewPager class and configure everything to make it work correctly.