summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget/FrameLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/widget/FrameLayout.java')
-rw-r--r--core/java/android/widget/FrameLayout.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java
index bcab7a9..940fec1 100644
--- a/core/java/android/widget/FrameLayout.java
+++ b/core/java/android/widget/FrameLayout.java
@@ -248,6 +248,7 @@ public class FrameLayout extends ViewGroup {
int maxHeight = 0;
int maxWidth = 0;
+ int childState = 0;
// Find rightmost and bottommost child
for (int i = 0; i < count; i++) {
@@ -256,6 +257,7 @@ public class FrameLayout extends ViewGroup {
measureChildWithMargins(child, widthMeasureSpec, 0, heightMeasureSpec, 0);
maxWidth = Math.max(maxWidth, child.getMeasuredWidth());
maxHeight = Math.max(maxHeight, child.getMeasuredHeight());
+ childState = combineMeasuredStates(childState, child.getMeasuredState());
}
}
@@ -274,8 +276,9 @@ public class FrameLayout extends ViewGroup {
maxWidth = Math.max(maxWidth, drawable.getMinimumWidth());
}
- setMeasuredDimension(resolveSize(maxWidth, widthMeasureSpec),
- resolveSize(maxHeight, heightMeasureSpec));
+ setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, childState),
+ resolveSizeAndState(maxHeight, heightMeasureSpec,
+ childState<<MEASURED_HEIGHT_STATE_SHIFT));
}
/**