diff options
| author | Fabrice Di Meglio <fdimeglio@google.com> | 2012-10-10 14:19:12 -0700 |
|---|---|---|
| committer | Fabrice Di Meglio <fdimeglio@google.com> | 2012-10-10 14:19:12 -0700 |
| commit | fbc21e126f329b7b7c161858c1390ccb023be07e (patch) | |
| tree | 860ffafc76c597a6146bbd4792274fe14bcbada4 /core/java/android/widget | |
| parent | 64182d8444e5f6c9bdc25d4a7e53fd8439e2303b (diff) | |
Fix bug #7325234 LayoutParams are not resolved correctly (Settings apps looks broken on Manta in Arabic)
- fix LayoutParams resolution for LinearLayout only
- apply onResolveLayoutDirection() in both measureHorizontal() and
measureVertical()
Change-Id: I5fcded9a79cd9aaeb0e12da7fd14176b71ba2fb6
Diffstat (limited to 'core/java/android/widget')
| -rw-r--r-- | core/java/android/widget/LinearLayout.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java index b6f08623a38f..2f31ebd44a0d 100644 --- a/core/java/android/widget/LinearLayout.java +++ b/core/java/android/widget/LinearLayout.java @@ -648,6 +648,8 @@ public class LinearLayout extends ViewGroup { int largestChildHeight = Integer.MIN_VALUE; + final int layoutDirection = getLayoutDirection(); + // See how tall everyone is. Also remember max width. for (int i = 0; i < count; ++i) { final View child = getVirtualChildAt(i); @@ -667,6 +669,7 @@ public class LinearLayout extends ViewGroup { } LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams(); + lp.onResolveLayoutDirection(layoutDirection); totalWeight += lp.weight; @@ -989,6 +992,8 @@ public class LinearLayout extends ViewGroup { int largestChildWidth = Integer.MIN_VALUE; + final int layoutDirection = getLayoutDirection(); + // See how wide everyone is. Also remember max height. for (int i = 0; i < count; ++i) { final View child = getVirtualChildAt(i); @@ -1009,6 +1014,7 @@ public class LinearLayout extends ViewGroup { final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams(); + lp.onResolveLayoutDirection(layoutDirection); totalWeight += lp.weight; |
