Scrollview with paging in android

is there a simple / native way to implement pagination / pagination on scrollviews? By simple, I mean the short part of the code, mainly using classes from the Android SDK, for example, when programming on the iPhone, writing "pagingEnabled = YES".

When I searched the topic on the Internet, I saw people insert code snippets in this regard, but these code snippets were very large, and I canโ€™t believe that Google really put an easy way to do it in my SDK. I also think that the code for its implementation can be much simpler than what I saw when searching. I am currently working on this, but at the same time, if anyone knows an easier way to do this, I would be happy to know about it.

Thank you for reading!

+6
source share
1 answer

I think there is no quick fix for this.

But what you can do is take the gallery component and redefine the layout. The gallery component has paging :)

Another solution might be:

Horizontal Pager - https://github.com/ysamlan/horizontalpager

Real View Switcher http://marcreichelt.blogspot.com/2010/09/android-use-realviewswitcher-to-switch.html

Hope this helps ...

+4
source

Source: https://habr.com/ru/post/903182/


All Articles