Android Image Slideshow using ViewPager with PagerAdapter

We’ve already discussed ViewPager in depth in one of my earlier posts. We saw how to use it with specific PagerAdapter implementations like FragmentPagerAdapter and FragmentStatePagerAdapter that works with fragments but we can also use it to inflate any other View or ViewGroup (with standard View hierarchy) by hooking it up with PagerAdapter itself. In this tutorial we’ll just discuss how to how to hook a PagerAdapter to a ViewPager to create an Image slideshow.

Continue reading

Android PagerTabStrip and PagerTitleStrip with ViewPager

Note: This post is sort of a continuation of my previous post on ViewPager and its related pager adapters with tabs.

When working with ViewPager we most likely include action bar tabs and integrate them with their corresponding screens in the ViewPager. Action bar tabs works great but just incase if you prefer scrollable tabs and want to use them over action bar tabs then there are two ways to achieve that:

Continue reading

Android Swipe (Touch Gesture) Views Using ViewPager, FragmentPagerAdapter and FragmentStatePagerAdapter With Tabs

Swipe Views are an efficient way to allow the user to laterally navigate among related data items spread across multiple panes using a simple touch gesture (swipes/flings), making access to data faster and much more enjoyable. Think of the android home screen where you can swipe across multiple sibling screens or the facebook or twitter app with multiple screens (and their respective tabs) where you can just swipe to navigate through them. The entire experience is super interactive and fun. They’re basically equivalent to slideshows/carousels which has sections with/without tabs (or similar controls to navigate) in the web development arena.

Continue reading