FlowLayout icon indicating copy to clipboard operation
FlowLayout copied to clipboard

Center Justify

Open jpshelley opened this issue 11 years ago • 6 comments

Would love to see a center justified option for this FlowLayout! I'd create a pull request, but just don't have the time right now.

jpshelley avatar Aug 29 '14 15:08 jpshelley

I'll try to take a look into that over the weekend. Maybe I'll add some sort of weight system similar to stock android LinearLayout, and than you could achieve this by setting same weight to al child view. Although this may be a bit of an overkill. :smile:

blazsolar avatar Aug 29 '14 16:08 blazsolar

@blazsolar No I was thinking the same thing really, either that or when the new line is created, add the children to a LinearLayout and center that within the FlowLayout. I think technically both would work?

jpshelley avatar Aug 29 '14 16:08 jpshelley

Yea, they would both work, but if you add LinearLayout to it you have one extra level in your layout hierarchy which is bad for for performance reasons.

blazsolar avatar Aug 29 '14 17:08 blazsolar

Hey @blazsolar, so I actually was already using the flow layout from "ApmeM" and realized it was a fairly easy process to create a center justification setting, so I sent him a pull request which you can find here. https://github.com/ApmeM/android-flowlayout/pull/23 I'm not quite sure how both of your libraries differ (Minus the fact I couldn't get it to pull down from Maven for some reason) but maybe that can help you with the justification! Let me know if I can help in anyway.

jpshelley avatar Aug 31 '14 03:08 jpshelley

Hey @blazsolar here is another newer library which is doing it using weights: https://github.com/suanmiao/flowlayout

manishkungwani avatar Mar 18 '15 19:03 manishkungwani

because this issue I decided to make https://github.com/ahmadmuzakki29/justify-layout. automatically wrap to new line, and re-arrange child to justified.

jekiapp avatar Aug 04 '16 01:08 jekiapp