Open ZacSweers opened 9 years ago
Sure, i have no problem with this.
This is a great idea. Would make it possible to just swap out a LayoutManager for the recycler. (Giving us grid, linear and staggered layouts).
Just got this working. Should have a PR sometime this weekend. :+1:
Great! Looking forward to it.
@AKiniyalocts not sure how far along you are, but one thing I've come across that we'd definitely want is proper WRAP_CONTENT support. Currently, neither Linear nor Grid Layout Managers support this though. I've found a manual implementation for LinearLayoutManger that works well, but haven't seen one for GridLayoutManager. Thoughts?
I don't mind using the manual implementation for LinearLayoutManger. For GridManager, my thoughts are that we can maybe take advantage of setHasFixedSize()
Relevant issue: https://code.google.com/p/android/issues/detail?id=74772
@hzsweers sorry, my previous time estimate was defeated by the holiday weekend :facepunch: . I've run into this before with WRAP_CONTENT in recycler. Have a working fix for Linear, but haven't managed to get Grid wrapping though. I'll have some more time today/tomorrow to investigate.
@AKiniyalocts no worries. The current implementations work fine, so no rush
On hold until google releases official WRAP_CONTENT support in Q1
So far, we've been using
ListView
andGridView
for everything, which has come with its fair share of problems. They're less flexible, less performant, and have forced us to dance around some bugs as well. I propose we switch to RecyclerView instead.Pros
Cons
Other things to consider
With its added flexibility, we should do due diligence to make sure the library can allow for users to hook into this fairly easily. I'm not familiar enough with RecyclerView to know if that would problematic, or if it's even a problem at all. Just something to keep in mind.
@markrietveld @st028 @emilsjolander thoughts?