devunwired/recyclerview-playground

Could you implement changable child view height in FixedGridLayoutManager

tounaobun opened this issue · 4 comments

In FixedGridLayoutManager,the childviews size is fixed.How could I make the child view height changable?

I too would love to know this as My goal is to implement multiple RecyclerViews below one another that scroll horizontally; which cannot be done currently as the FixedGridLayoutManager auto-fills the entire screen (looks like a fill-parent effect), which prevents anything from being visible below it.

I was able to find a workaround.

Follow the guide here: http://wiresareobsolete.com/2014/09/building-a-recyclerview-layoutmanager-part-1/
and the code will set to auto 'wrap' data in a recyclerView.

To adjust the size of it directly, just call:
.setMinimumHeight((int) pixels_variable); on your holder's layout item.

@PGMacDesign That's nice,but there is still a performance issue.When there are huge visible items on screen,say 100 items or more,and fling it as fast as you can,you would find it scroll hard and render slowly.

As described in the README, I cannot take on feature requests. If you have a patch to submit with this feature, I would be happy to review it.