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à

Deneb Chorny
  • 391
  • 3
  • 19

1 Answers1

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

Ankit Patidar
  • 2,731
  • 1
  • 14
  • 22
  • 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? – Deneb Chorny Nov 23 '17 at 17:45
  • Ha I understand that....but can you please tell me...whether left and right list are same or different – Ankit Patidar Nov 23 '17 at 17:46
  • 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 – Deneb Chorny Nov 23 '17 at 17:48
  • 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. – Ankit Patidar Nov 23 '17 at 17:51
  • Could you edit your answer and put that example in code? – Deneb Chorny Nov 23 '17 at 17:55
  • Deneb may I request you that I will do it tomorrow morning.... because I am in India and its night here...so I will write in TOMORROW TODO so surely will do it tomorrow morning – Ankit Patidar Nov 23 '17 at 17:56
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/159704/discussion-between-deneb-chorny-and-ankit-patidar). – Deneb Chorny Nov 23 '17 at 18:45