2

I am facing issue while enabling full scroll in drag/drop gesture of recycler view item. Here, I have a bit complicated layout, I have attached one image for easy understanding. Where,

  1. A = RV 1 having drag, drop and swipe gestures, Horizontal layoutManager

  2. B = RV 2 having swipe gesture, Horizontal layoutManager

  3. C = RV 3 having swipe gesture, Horizontal layoutManager
  4. D = RV 4 having grid layoutManager
  5. E = Frame Layout / container having 2 RV - only one will be visible at a time based on some logic
  6. F = Nested Scroll View

Here, When I am selecting an item from RV1 (A), It should scroll through all items of RV1 (A) But currently, It is getting scroll only into visible space of RV1. How can I make it work as expected?

Encountered Problem: It is happening because of NestedScrollView. It eats up a scroll event when RV1 (A) item is dragged. If I remove NestedScrollView, It can provide expected output. However, I can not remove it for sure!

Please Note: I can not change the layout and make it all fit into a single recycler view.

enter image description here

Dhara Vamja
  • 554
  • 4
  • 17
  • Check this out -- https://medium.com/@ipaulpro/drag-and-swipe-with-recyclerview-b9456d2b1aaf – Anuj Sharma Jun 13 '20 at 12:10
  • Thanks, @AnujSharma for the link! It's informative. However, I don't get my solution from there as they have documented gesture integration into one RecyclerView which I have already done. I'm facing issues in scroll when the drag gesture is enabled. – Dhara Vamja Jun 13 '20 at 12:19
  • 1
    Hey @Dhara, not 100% sure about your requirements but somewhere I believe I think you can achieve this in a single RV. Is there any specific reason to keep multiple RV's? – Anuj Sharma Jun 13 '20 at 19:32
  • 1
    @AnujSharma Yes, at the end it only worked when all data were fitted into one RV. However, I was just searching for a quick fix because of time shortage. – Dhara Vamja Jul 02 '20 at 05:53
  • 1
    Yeah, recycler view could be a complex solution if not used properly. Anyway, glad you got working solution. – Anuj Sharma Jul 02 '20 at 19:57

0 Answers0