47,419 views 146 on YTPak
94 50

Published on 16 Sep 2013 | over 3 years ago

Android ViewPager Example using java code

Subscribe To My Channel and Get More Great Tutorials
www.youtube.com/subscription_center

Ask me A Question
bit.ly/1MBekaP

The ViewPager is the widget that allows the user to swipe left or right to see an entirely new screen. In a sense, it's just a nicer way to show the user multiple tabs. It also has the ability to dynamically add and remove pages at any time. Consider the idea of grouping search results by certain categories, and showing each category in a separate list. With the ViewPager, the user could then swipe left or right to see other categorized lists. Using the ViewPager requires some knowledge of both Fragments and PageAdapters. In this case, Fragments are "pages". Each screen that the ViewPager allows the user to scroll to is really a Fragment. By using Fragments instead of a View here, we're given a much wider range of possibilities to show in each page. We're not limited to just a List of items. This could be any collection of views and widgets we may need. You can think of PageAdapters in the same way that you think of ListAdapters. The Page Adapter's job is to supply Fragments (instead of views) to the UI for drawing.

How to add viewpager control for browsing across multiple screens in your android application. A most used example of viewpager widget is the google play store app where you move between New Paid apps, New Free apps etc. using view pager widget.
Download source code fir this tutorial at www.indragni.com/android/ViewPagerExample.zip


Subscribe To My Channel and Get More Great Tutorials
www.youtube.com/subscription_center

Ask me A Question
bit.ly/1MBekaP

----------------------------------------­------------
Stay connected to Indragni Soft Solutions:
Website: www.indragni.com
Facebook: www.facebook.com/javaexper
Twitter: twitter.com/indragnisoft
Google+: plus.google.com/u/0/b/114543155372255472922/114543155372255472922/posts

Android ViewPager Example using java code

Loading related videos...