I have two HorizontalScrollView
s. If the user scrolls one ScrollView, the other ScrollView should also get scrolled. I am new to android and I wonder to know how can I achieve this?
Asked
Active
Viewed 498 times
0

Blo
- 11,903
- 5
- 45
- 99

user2699728
- 377
- 2
- 8
- 25
-
Is your elements in both scrollview same numbers. – maddy d Apr 16 '14 at 11:28
-
yes they are same...!! – user2699728 Apr 16 '14 at 11:29
-
See here. I think its perfect answer for you : http://stackoverflow.com/a/35147649/1621789 – Shaktisinh Jadeja Feb 02 '16 at 07:47
3 Answers
0
If you want your two different scrollviews to scroll at the same time it means you only need one scroll view in which you cand put the content within the ones you have now. Try do make thinghs as simple as you can

DDsix
- 1,966
- 1
- 18
- 23
0
Extend HorizontalScrollview like this: https://stackoverflow.com/a/6462630/1124160
onScroll in first ScrollView: http://developer.android.com/reference/android/widget/HorizontalScrollView.html#scrollTo(int, int)
Scroll the second one.
0
If your have number of items save in both HorizontalScrollView
, then create a GridView
and give number of columns equals to element in one HorizontalScrollView
. In this way you can achieve your goal.

maddy d
- 1,530
- 2
- 12
- 23