Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request google#76 from abarisain/copy-constructor
Browse files Browse the repository at this point in the history
Add a copy constructor for the layout parameters
  • Loading branch information
thagikura committed Jun 8, 2016
2 parents 9a2d3f8 + f4301cd commit b9d8a27
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2024,6 +2024,21 @@ public LayoutParams(Context context, AttributeSet attrs) {
a.recycle();
}

public LayoutParams(LayoutParams source) {
super(source);

order = source.order;
flexGrow = source.flexGrow;
flexShrink = source.flexShrink;
alignSelf = source.alignSelf;
flexBasisPercent = source.flexBasisPercent;
minWidth = source.minWidth;
minHeight = source.minHeight;
maxWidth = source.maxWidth;
maxHeight = source.maxHeight;
wrapBefore = source.wrapBefore;
}

public LayoutParams(ViewGroup.LayoutParams source) {
super(source);
}
Expand Down

0 comments on commit b9d8a27

Please sign in to comment.