private void adaptNavigationWidth ( ) { if ( frameLayout != null && navigationFragmentContainer != null && cardView != null && toolbarLarge != null ) { ViewCompat . setPaddingRelative ( navigationFragmentContainer , 0 , 0 , getDisplayWidth ( this ) - navigationWidth , 0 ) ; if ( ! isNavigationHidden ( ) ) { toolbarLarge . setNavigationWidth ( navigationWidth ) ; FrameLayout . LayoutParams cardViewLayoutParams = ( FrameLayout . LayoutParams ) cardView . getLayoutParams ( ) ; int margin = navigationWidth - getResources ( ) . getDimensionPixelSize ( R . dimen . card_view_intrinsic_margin ) ; setMarginStart ( cardViewLayoutParams , margin ) ; } } }
Adapts the width of the navigation .