-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StickyHeaders with GridLayoutManager #52
Comments
This is absolutely something I'd love to support. I can't give any time frame on it, though. There are a few gotchas that would have to be considered, though. For example, would requiring headers to be full-span be a reasonable limitation? If not, this would greatly increase the difficulty of implementation as I would have to determine in which column the header appeared when adding it to the parent view to be sticky. Also, would a header from one column "push" a header that was stickied in another column? That would look a bit weird. It would essentially require a completely different Positioner. So that would double the amount of work (new layout manager, new positioner). Again, I think this is a valid request, but I don't know when I'd have time to look into it. |
@bgogetap Yes, I think headers would have to be full span (full width of the RecyclerView). I can't actually think of a UI scenario where you would want two or more columns, but have the header NOT be full span. It would still push the header if it were full span. Ideally, the headers would work the same as with one column (LinearLayoutManager) except the non-header items would be in two or more columns. |
Hi @bgogetap i have added a Pull Request for Grid Layout Manager. if you have some time and think it adds value to get it merged let me know. but if you think its better that i fork and have my own repo for adding this functionality, feel free to let me know and i can do the same too :) |
It would be cool to implement this with GridLayoutManager. My app has a 2 column RecyclerView on landscape but I make the Header full width with the
setSpanSizeLookUp
. Check it out here https://stackoverflow.com/questions/26869312/set-span-for-items-in-gridlayoutmanager-using-spansizelookupMight be a bunch of extra work but let me know if this is possible. This would make this library usable in many more scenarios.
The text was updated successfully, but these errors were encountered: