I programmatically create buttons and add them into a relativelayout, whose parent is a HorizontalScrollView,
Occasionally the layout becomes really long and it would be nice to have a pager button that would jump from item #1 to the items 1 page over…
Is there any method(s) that would help me in placing an item i into slot #1 in the visible portion of the layout?
I can adjust my model to a LinearLayout if it’s an option.
Thanks!
From my understanding you are trying to flip between a group a buttons.
One way to flip between group of buttons would be to use a viewflipper. Keep a group of buttons in a linear layout. So when you want to flip to the next group use the
Another way would be to use the viewpager. Using the view pager will allow you to flip between layout by just sliding.
This might be of use, it is a blog post about pagination. And here is the source code.