提交 e206556d 编写于 作者: T Takeshi Hagikura

Merge pull request #24 from magazmj/master

getChildMeasureSpec use parent padding
...@@ -321,10 +321,10 @@ public class FlexboxLayout extends ViewGroup { ...@@ -321,10 +321,10 @@ public class FlexboxLayout extends ViewGroup {
// is set to wrap_content) // is set to wrap_content)
} }
int childWidthMeasureSpec = getChildMeasureSpec(widthMeasureSpec, int childWidthMeasureSpec = getChildMeasureSpec(widthMeasureSpec,
child.getPaddingLeft() + child.getPaddingRight() + lp.leftMargin getPaddingLeft() + getPaddingRight() + lp.leftMargin
+ lp.rightMargin, childWidth); + lp.rightMargin, childWidth);
int childHeightMeasureSpec = getChildMeasureSpec(heightMeasureSpec, int childHeightMeasureSpec = getChildMeasureSpec(heightMeasureSpec,
child.getPaddingTop() + child.getPaddingBottom() + lp.topMargin getPaddingTop() + getPaddingBottom() + lp.topMargin
+ lp.bottomMargin, lp.height); + lp.bottomMargin, lp.height);
child.measure(childWidthMeasureSpec, childHeightMeasureSpec); child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
childState = combineMeasuredStates(childState, child.getMeasuredState()); childState = combineMeasuredStates(childState, child.getMeasuredState());
...@@ -464,10 +464,10 @@ public class FlexboxLayout extends ViewGroup { ...@@ -464,10 +464,10 @@ public class FlexboxLayout extends ViewGroup {
} }
int childWidthMeasureSpec = getChildMeasureSpec(widthMeasureSpec, int childWidthMeasureSpec = getChildMeasureSpec(widthMeasureSpec,
child.getPaddingLeft() + child.getPaddingRight() + lp.leftMargin getPaddingLeft() + getPaddingRight() + lp.leftMargin
+ lp.rightMargin, lp.width); + lp.rightMargin, lp.width);
int childHeightMeasureSpec = getChildMeasureSpec(heightMeasureSpec, int childHeightMeasureSpec = getChildMeasureSpec(heightMeasureSpec,
child.getPaddingTop() + child.getPaddingBottom() + lp.topMargin getPaddingTop() + getPaddingBottom() + lp.topMargin
+ lp.bottomMargin, childHeight); + lp.bottomMargin, childHeight);
child.measure(childWidthMeasureSpec, childHeightMeasureSpec); child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
childState = combineMeasuredStates(childState, child.getMeasuredState()); childState = combineMeasuredStates(childState, child.getMeasuredState());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册