0

I have two HorizontalScrollViews. 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?

Blo
  • 11,903
  • 5
  • 45
  • 99
user2699728
  • 377
  • 2
  • 8
  • 25

3 Answers3

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.

Community
  • 1
  • 1
damian
  • 2,001
  • 20
  • 38
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