@@ -856,6 +856,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
856856 final int paddingRight = getPaddingRight ();
857857 final int height = maxHeight - verticalPadding ;
858858 final int childSpecHeight = MeasureSpec .makeMeasureSpec (height , MeasureSpec .AT_MOST );
859+ final int exactHeightSpec = MeasureSpec .makeMeasureSpec (height , MeasureSpec .EXACTLY );
859860
860861 int availableWidth = contentWidth - paddingLeft - paddingRight ;
861862 int leftOfCenter = availableWidth / 2 ;
@@ -871,16 +872,14 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
871872 } else {
872873 homeWidthSpec = MeasureSpec .makeMeasureSpec (lp .width , MeasureSpec .EXACTLY );
873874 }
874- homeLayout .measure (homeWidthSpec ,
875- MeasureSpec .makeMeasureSpec (height , MeasureSpec .EXACTLY ));
875+ homeLayout .measure (homeWidthSpec , exactHeightSpec );
876876 final int homeWidth = homeLayout .getMeasuredWidth () + homeLayout .getStartOffset ();
877877 availableWidth = Math .max (0 , availableWidth - homeWidth );
878878 leftOfCenter = Math .max (0 , availableWidth - homeWidth );
879879 }
880880
881881 if (mMenuView != null && mMenuView .getParent () == this ) {
882- availableWidth = measureChildView (mMenuView , availableWidth ,
883- childSpecHeight , 0 );
882+ availableWidth = measureChildView (mMenuView , availableWidth , exactHeightSpec , 0 );
884883 rightOfCenter = Math .max (0 , rightOfCenter - mMenuView .getMeasuredWidth ());
885884 }
886885
0 commit comments