0

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 Answer 1

0

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! :)

Sign up to request clarification or add additional context in comments.

7 Comments

No, I don't want to scroll to specific position I just need to PUT the scroll of the recycler in that position. I mean, as you can see in the picture the scroll ins't in the left nor the right it is placed almost in the center. Do you know what I mean?
Ha I understand that....but can you please tell me...whether left and right list are same or different
The list are the same. It is easier to manipulate it instead of two lists. My idea is that each item is just a row and the scrollbar overlaps them as the pictures I shared in the question
OK we can do this by frame layout.....just make frame layout as parent layout...and insert two layout as child named as: first one is list and then second is at scrollbar which overlaps the list.
Could you edit your answer and put that example in code?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.