Reputation: 4103
I want to scroll multiple items in Horizontal scroll view
on the click of left
and right
arrow click which are resided in both corners. Means I have a Horizontal scroll view
with two buttons left and right for scrolling items according to the same. I have searched enough on web but nothing matched. Please suggest me for the right solution regarding the same.
Upvotes: 0
Views: 1882
Reputation: 29199
just set focus on next child, by using following methods:
`viewGroup.findFocus();
to get View which is focused,
and getNext vuew from layout and set focus on that view by:
view.requestFocus();
Upvotes: 0
Reputation: 7644
Use yourScrollView.scrollTo(x, y);
in the button listener method. Add further conditions to limit the ends or to make it infinitely scrollable.
Go through the android documentation for more info...
Upvotes: 1