0

I have created a RecyclerView that scrolls vertically. Inside that recyclerView I am inflating CardViews that contain a RecyclerView inside Of them that also displays items vertically. Whenever I want to scroll RecyclerView inside my cards their scroll is being ignored.

I have been told it isn't a good practice to have two recyclers that scroll in the same direction inside each other but I am creating an app with similar functionality to an IOS app and the inner scroll works great on that app.

Gal
  • 422
  • 5
  • 21
  • try to use a scrollview inside to make things simple – Pemba Tamang Aug 01 '19 at 09:03
  • Also my opinion is this is a bad practice to pur RecyclerView inside other RecyclerView. Maybe you can make the nested RecyclerView horizontally scrolling? – MrVasilev Aug 01 '19 at 09:20
  • @MrVasilev Sadly I can't the company I work at want it to scroll the same as the IOS version. – Gal Aug 01 '19 at 09:29
  • Don't use a scrollview or similar (that would defeat the behavior of a RecyclerView, which would then stop recycling views and act like a long list of stuff delegating the function of scrolling and inflation to the ScrollView, which knows nothing about recycling); You are going to have to play around with Touch listeners/gesture detectors to decide where to forward the touch/motion events. I never had to do this, but I'd start there. – Martin Marconcini Aug 01 '19 at 10:23
  • @MartinMarconcini Thanks, sounds like a good idea – Gal Aug 01 '19 at 10:56
  • Possible duplicate of [How to disable RecyclerView scrolling?](https://stackoverflow.com/questions/30531091/how-to-disable-recyclerview-scrolling) – Alireza Tizfahm Fard Aug 01 '19 at 15:38

0 Answers0