1

enter image description here

Is there any library or any way in which we can sync between the RecyclerView and the Seekbar. By that I mean is that when I drag seekbar the items change, the seekbar width define the maximum scroll that the recycler can have. Similarly when I scroll the recyclerview the seekbar should update.

In short both should be in sync. Or is there any other way to handle it.

What I am trying to achieve can be seen from the image attached to this question. Here top section is the seekbar and the bottom section is recyclerview.

Any solution or help is appreciated.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Gaurav A Dubey
  • 641
  • 1
  • 6
  • 19

1 Answers1

0

First of all, you can listen to the change of seek bar value by the setOnSeekBarChangeListener(). See get android seek bar value and display it on screen .

Then, when seek bar value is changed, you can notify the recycler view to scroll to any position by the smoothScrollToPosition() of recycler view or smoothScrollToPosition() of linear layout manager

Myrick Chow
  • 332
  • 1
  • 6
  • 16