ShamylZakariya / StickyHeaders

Adapter and LayoutManager for Android RecyclerView which enables sticky header positioning.
MIT License
1.4k stars 185 forks source link

Nested RescyclerView does not work with WRAP_CONTENT #77

Open kaloglu opened 6 years ago

kaloglu commented 6 years ago

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

robotsquidward commented 6 years ago

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 commented 6 years ago

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.

ibrcic commented 5 years ago

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

robotsquidward commented 5 years ago

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

ShamylZakariya commented 5 years ago

@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.

ibrcic commented 5 years ago

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...

ShamylZakariya commented 5 years ago

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.

Steve623-max commented 4 years ago

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.

ratanakpek commented 2 years ago

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