Skip to content

Commit 7573b1e

Browse files
Fabrice Di MeglioAndroid (Google) Code Review
authored andcommitted
Merge "Fix bug #7325234 LayoutParams are not resolved correctly (Settings apps looks broken on Manta in Arabic)" into jb-mr1-dev
2 parents 0dd0b14 + fbc21e1 commit 7573b1e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/java/android/widget/LinearLayout.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,8 @@ void measureVertical(int widthMeasureSpec, int heightMeasureSpec) {
648648

649649
int largestChildHeight = Integer.MIN_VALUE;
650650

651+
final int layoutDirection = getLayoutDirection();
652+
651653
// See how tall everyone is. Also remember max width.
652654
for (int i = 0; i < count; ++i) {
653655
final View child = getVirtualChildAt(i);
@@ -667,6 +669,7 @@ void measureVertical(int widthMeasureSpec, int heightMeasureSpec) {
667669
}
668670

669671
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams();
672+
lp.onResolveLayoutDirection(layoutDirection);
670673

671674
totalWeight += lp.weight;
672675

@@ -989,6 +992,8 @@ void measureHorizontal(int widthMeasureSpec, int heightMeasureSpec) {
989992

990993
int largestChildWidth = Integer.MIN_VALUE;
991994

995+
final int layoutDirection = getLayoutDirection();
996+
992997
// See how wide everyone is. Also remember max height.
993998
for (int i = 0; i < count; ++i) {
994999
final View child = getVirtualChildAt(i);
@@ -1009,6 +1014,7 @@ void measureHorizontal(int widthMeasureSpec, int heightMeasureSpec) {
10091014

10101015
final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)
10111016
child.getLayoutParams();
1017+
lp.onResolveLayoutDirection(layoutDirection);
10121018

10131019
totalWeight += lp.weight;
10141020

0 commit comments

Comments
 (0)