-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Flexbox not respecting children margins #86
Comments
Could you also share the enclosing FlexboxLayout's xml and if possible, screenshot of the result (it will be more clear if you check "Show layout bounds" in the developer options)? |
Also it's not related to the issue, but I recommend removing the LinearLayout. Instead I recommend to make its children (TextView, ImageView) become direct children of the FlexboxLayout if possible. Because it reduces the nested view group, it will gain performance improvement. If you set |
Hi, any updates on this one? Is the issue still persistent? |
Please reopen it if the issue is still persistent. |
Hello. It seems to me that I encountered the same problem. I've got flexbox layout as a container and I'm adding TextViews to it. However, despite setting margins programmatically they won't appear in the layout. When switching to LinearLayout margins are working without problems. Is there any solution? |
@lukasz-gosiewski @thagikura hi, i have the same issue too when i adding the button with margin programmatically, the margins wont appear in layout. |
I am having the same margin problem on programmatically generated child elements of FlexBoxLayout. I have opened a new issue #356 |
How about using couple of '...xml' layouts for your TextView with different margins -> And then just inflate appropriate '...xml' accordingly to situation? I'm just trying to implement... |
We're on
0.2.2
. We had wanted a slight margin (4dp) in between items in theflexbox
, as well as between the lines when theflexbox
wrapped the items. However, after trying multiple variations of applying margin to the items in theflexbox
it did not seem to comply. Is this possible? We resorted to using anotherFrameLayout
around theLinearLayout
for padding, but what wondering if this is a bug or just not supported functionality withinflexbox
?For example here is the item we were using in the flexbox. It was not respecting the
layout_marginBottom
orlayout_marginRight
on theLinearLayout
:The text was updated successfully, but these errors were encountered: