@@ -946,9 +946,6 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
946946 final ActionBar .LayoutParams ablp = lp instanceof ActionBar .LayoutParams ?
947947 (ActionBar .LayoutParams ) lp : null ;
948948
949- final int layoutDirection = getLayoutDirection ();
950- lp .resolveLayoutDirection (layoutDirection );
951-
952949 int horizontalMargin = 0 ;
953950 int verticalMargin = 0 ;
954951 if (ablp != null ) {
@@ -1099,9 +1096,8 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
10991096 customView = mCustomNavView ;
11001097 }
11011098 if (customView != null ) {
1102- ViewGroup .LayoutParams lp = customView .getLayoutParams ();
11031099 final int layoutDirection = getLayoutDirection ();
1104- lp . resolveLayoutDirection ( layoutDirection );
1100+ ViewGroup . LayoutParams lp = customView . getLayoutParams ( );
11051101 final ActionBar .LayoutParams ablp = lp instanceof ActionBar .LayoutParams ?
11061102 (ActionBar .LayoutParams ) lp : null ;
11071103 final int gravity = ablp != null ? ablp .gravity : DEFAULT_CUSTOM_GRAVITY ;
@@ -1339,15 +1335,11 @@ public int getStartOffset() {
13391335 @ Override
13401336 protected void onMeasure (int widthMeasureSpec , int heightMeasureSpec ) {
13411337 measureChildWithMargins (mUpView , widthMeasureSpec , 0 , heightMeasureSpec , 0 );
1342- // measureChildWithMargins() has triggered layout params resolution, so no need
1343- // to do it now
13441338 final LayoutParams upLp = (LayoutParams ) mUpView .getLayoutParams ();
13451339 mUpWidth = upLp .leftMargin + mUpView .getMeasuredWidth () + upLp .rightMargin ;
13461340 int width = mUpView .getVisibility () == GONE ? 0 : mUpWidth ;
13471341 int height = upLp .topMargin + mUpView .getMeasuredHeight () + upLp .bottomMargin ;
13481342 measureChildWithMargins (mIconView , widthMeasureSpec , width , heightMeasureSpec , 0 );
1349- // measureChildWithMargins() has triggered layout params resolution, so no need
1350- // to do it now
13511343 final LayoutParams iconLp = (LayoutParams ) mIconView .getLayoutParams ();
13521344 width += iconLp .leftMargin + mIconView .getMeasuredWidth () + iconLp .rightMargin ;
13531345 height = Math .max (height ,
@@ -1387,12 +1379,10 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
13871379 protected void onLayout (boolean changed , int l , int t , int r , int b ) {
13881380 final int vCenter = (b - t ) / 2 ;
13891381 final boolean isLayoutRtl = isLayoutRtl ();
1390- final int layoutDirection = getLayoutDirection ();
13911382 final int width = getWidth ();
13921383 int upOffset = 0 ;
13931384 if (mUpView .getVisibility () != GONE ) {
13941385 final LayoutParams upLp = (LayoutParams ) mUpView .getLayoutParams ();
1395- upLp .resolveLayoutDirection (layoutDirection );
13961386 final int upHeight = mUpView .getMeasuredHeight ();
13971387 final int upWidth = mUpView .getMeasuredWidth ();
13981388 upOffset = upLp .leftMargin + upWidth + upLp .rightMargin ;
@@ -1413,7 +1403,6 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
14131403 }
14141404
14151405 final LayoutParams iconLp = (LayoutParams ) mIconView .getLayoutParams ();
1416- iconLp .resolveLayoutDirection (layoutDirection );
14171406 final int iconHeight = mIconView .getMeasuredHeight ();
14181407 final int iconWidth = mIconView .getMeasuredWidth ();
14191408 final int hCenter = (r - l ) / 2 ;
0 commit comments