Skip to content

Commit bec9401

Browse files
committed
Add a copy constructor for the layout parameters
1 parent 9a2d3f8 commit bec9401

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

flexbox/src/main/java/com/google/android/flexbox/FlexboxLayout.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,6 +2024,16 @@ public LayoutParams(Context context, AttributeSet attrs) {
20242024
a.recycle();
20252025
}
20262026

2027+
public LayoutParams(LayoutParams source) {
2028+
super(source);
2029+
2030+
order = source.order;
2031+
flexGrow = source.flexGrow;
2032+
flexShrink = source.flexShrink;
2033+
alignSelf = source.alignSelf;
2034+
flexBasisPercent = source.flexBasisPercent;
2035+
}
2036+
20272037
public LayoutParams(ViewGroup.LayoutParams source) {
20282038
super(source);
20292039
}

0 commit comments

Comments
 (0)