@@ -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