diff options
author | Adam Powell <adamp@google.com> | 2012-05-04 14:49:46 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2012-05-04 14:54:14 -0700 |
commit | eabc9198447c7f6253fcbee8af2887a650e79b00 (patch) | |
tree | 2a8f0c80c7d1c11309788f6f02e72da85f1fbd6e /core/java/android/widget/LinearLayout.java | |
parent | e825b3e3d41e3fd2f6f3bbdf9feb6b8cc87a77dd (diff) | |
download | frameworks_base-eabc9198447c7f6253fcbee8af2887a650e79b00.zip frameworks_base-eabc9198447c7f6253fcbee8af2887a650e79b00.tar.gz frameworks_base-eabc9198447c7f6253fcbee8af2887a650e79b00.tar.bz2 |
Fix LinearLayout measureWithLargestChild for wrap_content views
Bug 6442795
When the measureWithLargestChild setting is enabled, LL used to
measure the full container taking the largest child rule into account,
but the child views were not properly remeasured for AT_MOST
measurespecs. Correct this.
Fix measureWithLargestChild for height
Change-Id: Ieb91114bc2ae65f9104337bd6d16a7d9e559571d
Diffstat (limited to 'core/java/android/widget/LinearLayout.java')
-rw-r--r-- | core/java/android/widget/LinearLayout.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java index 5ed005f..2391898 100644 --- a/core/java/android/widget/LinearLayout.java +++ b/core/java/android/widget/LinearLayout.java @@ -867,7 +867,7 @@ public class LinearLayout extends ViewGroup { // We have no limit, so make all weighted views as tall as the largest child. // Children will have already been measured once. - if (useLargestChild && widthMode == MeasureSpec.UNSPECIFIED) { + if (useLargestChild && heightMode != MeasureSpec.EXACTLY) { for (int i = 0; i < count; i++) { final View child = getVirtualChildAt(i); @@ -1283,7 +1283,7 @@ public class LinearLayout extends ViewGroup { // We have no limit, so make all weighted views as wide as the largest child. // Children will have already been measured once. - if (useLargestChild && widthMode == MeasureSpec.UNSPECIFIED) { + if (useLargestChild && widthMode != MeasureSpec.EXACTLY) { for (int i = 0; i < count; i++) { final View child = getVirtualChildAt(i); |