Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Center Justify #8

Open
jpshelley opened this issue Aug 29, 2014 · 6 comments
Open

Center Justify #8

jpshelley opened this issue Aug 29, 2014 · 6 comments

Comments

@jpshelley
Copy link

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.

@blazsolar
Copy link
Owner

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

@jpshelley
Copy link
Author

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

@blazsolar
Copy link
Owner

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.

@jpshelley
Copy link
Author

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.
ApmeM/android-flowlayout#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.

@manishkungwani
Copy link

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

@jekiapp
Copy link

jekiapp commented Aug 4, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants