500px / greedo-layout-for-android

Full aspect ratio grid LayoutManager for Android's RecyclerView
MIT License
1.64k stars 156 forks source link

Have last row expand to fill leftover width #13

Open alashow opened 8 years ago

alashow commented 8 years ago

Hello.

Is it possible to add feature to fill full width on the last row? Without leaving blank space?

Blank spaces are okay when it's used in simple way (just recyclerView itself), but I want to use it as another recyclerView item, i.e main recyclerView items are recycylerViews with greedoLayoutManager.

Example usage case could be, photosets for post. Post is item of main recyclerView, and photoset is inner recyclerView with greedoLayoutManager.

Screenshots

First one is okay, but not second.

JVillella commented 8 years ago

Hey @alashow. I'm not entirely sure if I understand your question. Is it that you want to have the layout take the total available height? In other words, have an auto max row width that determines the correct value to fill the entire view height. Or is it that you want a justified width, so that the last row (e.x. with your second screenshot) will adjust the height so that it fits the entire width while maintaining the aspect ratio?

alashow commented 8 years ago

Or is it that you want a justified width, so that the last row (e.x. with your second screenshot) will adjust the height so that it fits the entire width while maintaining the aspect ratio?

Yes, it's exactly what i want. Is it possible?

JVillella commented 8 years ago

@alashow not currently unfortunately! This could be a useful feature to add though.

alashow commented 8 years ago

@JVillella, any updates on this?

BTW, what if the last row have more than one image? My goal is to not leave empty spaces when more width is available.

indriks commented 7 years ago

@JVillella @alashow This feature is built and have pull request. Alternatively, @alashow you can get it here https://github.com/indriks/greedo-layout-for-android