Merge "Check RelativeLayout's access of its own LayoutParams during measurement" into klp-dev
This commit is contained in:
@@ -536,7 +536,7 @@ public class RelativeLayout extends ViewGroup {
|
|||||||
// the right of each child view
|
// the right of each child view
|
||||||
width += mPaddingRight;
|
width += mPaddingRight;
|
||||||
|
|
||||||
if (mLayoutParams.width >= 0) {
|
if (mLayoutParams != null && mLayoutParams.width >= 0) {
|
||||||
width = Math.max(width, mLayoutParams.width);
|
width = Math.max(width, mLayoutParams.width);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,7 +566,7 @@ public class RelativeLayout extends ViewGroup {
|
|||||||
// the bottom of each child view
|
// the bottom of each child view
|
||||||
height += mPaddingBottom;
|
height += mPaddingBottom;
|
||||||
|
|
||||||
if (mLayoutParams.height >= 0) {
|
if (mLayoutParams != null && mLayoutParams.height >= 0) {
|
||||||
height = Math.max(height, mLayoutParams.height);
|
height = Math.max(height, mLayoutParams.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user