Skip to content

Conversation

abarisain
Copy link
Contributor

Both the base LayoutParams and ViewGroup's implement a copy constructor, which is handy for a lot of cases.
Calling the copy constructor on FlexboxLayout.LayoutParams does not produce the expected result: parent properties are properly copied, but any FlexboxLayout specific attribute is ignored.

This pull requests adds a new copy constructor to FlexboxLayout's LayoutParams, making it behave as expected.

flexGrow = source.flexGrow;
flexShrink = source.flexShrink;
alignSelf = source.alignSelf;
flexBasisPercent = source.flexBasisPercent;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please copy other fields as well.
(minWidth/minHeight, maxWidth/maxHeight, wrapBefore)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that, I'll fix it

Copy link
Contributor

@thagikura thagikura Jun 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. When you do so, please squash the commit into the previous one.

@thagikura
Copy link
Contributor

thagikura commented Jun 8, 2016

Thanks! Could you copy other fields as well?
Otherwise LGTM.

@thagikura thagikura added this to the 0.2.2 milestone Jun 8, 2016
@abarisain
Copy link
Contributor Author

It should be good. Sorry about the forgotten fields!

@thagikura thagikura merged commit b9d8a27 into google:master Jun 8, 2016
@thagikura
Copy link
Contributor

LGTM! Merged.

@thagikura thagikura added the bug label Jun 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants