On Wed, Mar 28, 2012 at 2:34 PM, Justin Anderson <[email protected]> wrote:
>> If you're swiping, how would it make sense to move from the last to first
>> in one swipe?
>
> I've actually seen this on some apps and, if done right, it works... I
> basically just turns the pages into a loop.  That way if you have n pages
> are on the last page you don't have to swipe n - 1 times to get back to the
> first page...  A single swipe can bring you back to the first.

I imagine that you'd do that the same way you do an "infinite" gallery
-- have your PagerAdapter return a huge number from getCount(), then
interpret all the incoming position values (e.g., to
instantiateItem()) as being modulo your actual size.

However, I doubt that FragmentPagerAdapter/FragmentStatePagerAdapter
would be aware of this behavior, and so you would probably have to
roll your own PagerAdapter implementation. I also am uncertain how
well this will work with PagerTitleStrip and kin.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to