Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Scroll Pagination

Is there something for the Android OS with which you can implement scroll pagination?

*Edit
With scroll pagination I mean pagination like on the homescreen, you can swipe right and left and go to the next or previous page.

like image 832
Thizzer Avatar asked Dec 27 '09 19:12

Thizzer


2 Answers

You can take example on the source code of Launcher at android.git.kernel.org. Look for the classes called Workspace and CellLayout.

like image 141
Romain Guy Avatar answered Oct 08 '22 15:10

Romain Guy


According to Apple, UIPageControl does not implement "scroll pagination", at least how I would interpret that phrase. UIPageControl tracks a number of pages, shows dots based on the page count/current page, and fires events when the user taps it. It does not actually implement "pagination" (you have to handle that yourself) and has nothing to do with scrolling.

All that being said, there is no "show a bunch of dots" widget built into Android with the same or similar API to UIPageControl. Creating one for your application would be fairly simple, using a set of ImageViews, watching for taps, replacing image resources to change dot colors, and firing events to registered listeners.

like image 24
CommonsWare Avatar answered Oct 08 '22 14:10

CommonsWare