Archive for the ‘ViewPager’ Category

Adapters – Part 6

Friday, May 10th, 2013

Previously in this series we’ve looked at different kinds of Adapters, and in two separate separate series on Styling Android (ViewPager and ViewPager Redux) we’ve looked at ViewPagers. In this article we’re going to look at the common factor of both of these: PagerAdapters.
(more…)

ViewPager Redux – Part 3

Friday, November 30th, 2012

In the previous article we got a basic implementation of the PageTabStrip working with our ViewPager. In this article we’ll look at applying some styles to it.
(more…)

ViewPager Redux – Part 2

Friday, November 23rd, 2012

In the previous article we revisited the ViewPager code from an earlier series, and brought it up-to-date to use the latest version of Jake Wharton’s ViewPagerIndicator library. In this article we’ll look at an alternative to Jake’s library.
(more…)

ViewPager Redux – Part 1

Friday, November 16th, 2012

In September 2011 I began a series on Styling Android about ViewPager and Jake Wharton’s ViewPagerIndicator library. This proved to be a very popular series, but the comments on those articles show that there has been some changes in Jake’s library which means that the code in the original articles no longer works with the latest version of the library. In this series we’ll revisit ViewPager and ViewPagerIndicator, get the old example code working with the latest version of the library, and also look at some alternatives.
(more…)

ViewPager – Part 3

Friday, September 16th, 2011

Important note: There is a more recent article which covers a newer version of ViewPagerIndicator. Please refer to this in conjunction with this article

At the end of part 2 of this series, we had added ListView controls to each of our ViewPager views, but we lost the scroll position when we moved away from the view. Let’s look at how we can implement the scroll state persistence.
(more…)

ViewPager – Part 2

Friday, September 9th, 2011

Important note: There is a more recent article which covers a newer version of ViewPagerIndicator. Please refer to this in conjunction with this article

In the part 1 we got a simple ViewPager working with a TitlePageIndictor. This gave us some pretty impressive results for a relatively small amount of effort. But, given that this blog is focussed on making things look good, what about if you want to change things? (more…)

ViewPager – Part 1

Friday, September 2nd, 2011

Important note: There is a more recent article which covers a newer version of ViewPagerIndicator. Please refer to this in conjunction with this article

Richard Hyndman recently wrote on his personal blog and the Android Developers blog about the ViewPager functionality which has been added to the Android Compatibility Library. Jake Wharton has published his ViewPagerIndicator which works in conjunction with ViewPager and gives some pretty slick behaviour for surprisingly little effort. In this article, we’ll have a look at how to use both of these in a project.

(more…)