greedo-layout-for-android icon indicating copy to clipboard operation
greedo-layout-for-android copied to clipboard

Have last row expand to fill leftover width

Open alashow opened this issue 9 years ago • 5 comments

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.

alashow avatar Mar 11 '16 22:03 alashow

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?

JVillella avatar Mar 29 '16 03:03 JVillella

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?

alashow avatar Mar 29 '16 03:03 alashow

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

JVillella avatar Mar 29 '16 04:03 JVillella

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

alashow avatar Jun 08 '16 23:06 alashow

@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

indriks avatar Jan 19 '17 16:01 indriks