@@ -369,10 +369,10 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
369369 int width = 0 ;
370370 int height = 0 ;
371371
372- final int widthMode = MeasureSpec .getMode (widthMeasureSpec );
373- final int heightMode = MeasureSpec .getMode (heightMeasureSpec );
374- final int widthSize = MeasureSpec .getSize (widthMeasureSpec );
375- final int heightSize = MeasureSpec .getSize (heightMeasureSpec );
372+ int widthMode = MeasureSpec .getMode (widthMeasureSpec );
373+ int heightMode = MeasureSpec .getMode (heightMeasureSpec );
374+ int widthSize = MeasureSpec .getSize (widthMeasureSpec );
375+ int heightSize = MeasureSpec .getSize (heightMeasureSpec );
376376
377377 // Record our dimensions if they are known;
378378 if (widthMode != MeasureSpec .UNSPECIFIED ) {
@@ -637,12 +637,7 @@ private void measureChildHorizontal(View child, LayoutParams params, int myWidth
637637 mPaddingLeft , mPaddingRight ,
638638 myWidth );
639639 int childHeightMeasureSpec ;
640- if (myHeight < 0 ) {
641- // Negative values in a mySize/myWidth/myWidth value in RelativeLayout measurement
642- // is code for, "we got an unspecified mode in the RelativeLayout's measurespec."
643- // Carry it forward.
644- childHeightMeasureSpec = MeasureSpec .makeMeasureSpec (0 , MeasureSpec .UNSPECIFIED );
645- } else if (params .width == LayoutParams .MATCH_PARENT ) {
640+ if (params .width == LayoutParams .MATCH_PARENT ) {
646641 childHeightMeasureSpec = MeasureSpec .makeMeasureSpec (myHeight , MeasureSpec .EXACTLY );
647642 } else {
648643 childHeightMeasureSpec = MeasureSpec .makeMeasureSpec (myHeight , MeasureSpec .AT_MOST );
@@ -669,13 +664,6 @@ private void measureChildHorizontal(View child, LayoutParams params, int myWidth
669664 private int getChildMeasureSpec (int childStart , int childEnd ,
670665 int childSize , int startMargin , int endMargin , int startPadding ,
671666 int endPadding , int mySize ) {
672- if (mySize < 0 ) {
673- // Negative values in a mySize/myWidth/myWidth value in RelativeLayout measurement
674- // is code for, "we got an unspecified mode in the RelativeLayout's measurespec."
675- // Carry it forward.
676- return MeasureSpec .makeMeasureSpec (0 , MeasureSpec .UNSPECIFIED );
677- }
678-
679667 int childSpecMode = 0 ;
680668 int childSpecSize = 0 ;
681669
0 commit comments