开发者

Android Scroll Pagination

Is there something f开发者_高级运维or 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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜