views:

1062

answers:

2

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.

+2  A: 

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.

CommonsWare
sorry, I rephrased the question..
MrThys
+3  A: 

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

Romain Guy
I agree this functionality can be found in Launcher application. And it can be extracted from there.
Fedor
Can you give me the direct link to the Launcher source?
MrThys
@MrThyhs: http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=blob_plain;f=src/com/android/launcher/Workspace.java;hb=HEAD, http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=blob_plain;f=src/com/android/launcher/CellLayout.java;hb=HEAD
jay