StickyHeaders icon indicating copy to clipboard operation
StickyHeaders copied to clipboard

Nested RescyclerView does not work with WRAP_CONTENT

Open kaloglu opened this issue 6 years ago • 9 comments

Nested Recyclerview in CardView work with LinearLayoutManager but does not work with StickyHeaderLayoutManager.

kaloglu avatar Dec 13 '17 15:12 kaloglu

I have a similar issue with a RecyclerView in a BottomSheet. LinearLayoutManager works like a charm for scrolling but StickyHeaderLayoutManager doesn't enable scrolling down without scrolling down the BottomSheet.

robotsquidward avatar Aug 06 '18 19:08 robotsquidward

By modifying the StickyHeaderLayoutManager slightly to subclass the LinearLayoutManager rather than the RecyclerView.LayoutManager, I got the behavior I wanted in a BottomSheet 🎉

I might play around with creating a PR for a fix based on this, but if anyone else wants to jump on it then by all means, do.

robotsquidward avatar Aug 06 '18 20:08 robotsquidward

I have the exact same problem as @robotsquidward , have you perhaps created a PR?

ibrcic avatar May 07 '19 16:05 ibrcic

@ibrcic I have not created a PR yet unfortunately. But please go for it if you are able to!

robotsquidward avatar May 08 '19 00:05 robotsquidward

@ibrcic I have not created a PR yet unfortunately. But please go for it if you are able to!

I would absolutely love to see this. Please give it a go.

ShamylZakariya avatar May 23 '19 13:05 ShamylZakariya

I gave it a go some time ago, essentially I tried extending LinearLayoutManager and initially it seemed to work but it seems that it breaks some other things, so I gave up since I am not familiar enough with LayoutManagers...

ibrcic avatar May 23 '19 14:05 ibrcic

If you want to send an example project my way I'd be interested because I might be able to improve it and integrate it. But I understand it's not PR-ready.

ShamylZakariya avatar May 23 '19 14:05 ShamylZakariya

Auto resizing is not working so it's disabling keyboard up. And same issue with wrap_content height even though recyclerview was supposed to be resized automatically.

Steve623-max avatar May 13 '20 09:05 Steve623-max

When I use StickyHeaderLayoutManager, it conflict scrolling between recyclerview and bottomsheet...

ratanakpek avatar Jun 30 '22 09:06 ratanakpek