How to define position of scrollbar view inside recyclerview?

1k Views Asked by At

I am trying to do something like this:

enter image description here

I just need to put the scrollbar of the recycler in that position overlaping the views and no more.

Why?

Easy, this interface is a little complex to achieve with 2 recyclersview or 2 scrollviews and handling the scroll between them.

My idea is to find the simplest way. And this could be easy made with:

1) The scrollbar I am telling you I need to achieve. Placing it almost at the middle of the screen. (Not scrolling items)

2) Use each item of the adapter as a simple row like this:

enter image description here

3) Nothing more and voilà

1

There are 1 best solutions below

7
Ankit Patidar On

By this code, you can scroll specific index in recycler view::

    LinearLayoutManager linearLayoutManager = (LinearLayoutManager) listViewSearch.getLayoutManager();

    linearLayoutManager.scrollToPositionWithOffset(idx, 0);

//idx = index

and now your problem that you want to scroll both scroll view simultaneously, so when you scroll "left recycler" to some position, you got index on which you are, so you can scroll "right recycler" compare to that.

Always there to help! :)