private void updateHeaderTextSizeAndMargin(){
  if (isTwoPanel) {
    return;
  }
  largeTextView.setPivotX(0);
  largeTextView.setPivotY(largeTextView.getHeight() / 2);
  final int toolbarHeight=toolbar.getLayoutParams().height;
  photoTouchInterceptOverlay.setClickable(toolbarHeight != maximumHeaderHeight);
  if (toolbarHeight >= maximumHeaderHeight) {
    largeTextView.setScaleX(1);
    largeTextView.setScaleY(1);
    setInterpolatedTitleMargins(1);
    return;
  }
  final float ratio=(toolbarHeight - minimumHeaderHeight) / (float)(maximumHeaderHeight - minimumHeaderHeight);
  final float minimumSize=invisiblePlaceholderTextView.getHeight();
  float bezierOutput;
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    bezierOutput=textSizePathInterpolator.getInterpolation(ratio);
  }
 else {
    bezierOutput=ratio;
  }
  float scale=(minimumSize + (maximumHeaderTextSize - minimumSize) * bezierOutput) / maximumHeaderTextSize;
  bezierOutput=Math.min(bezierOutput,1.0f);
  scale=Math.min(scale,1.0f);
  largeTextView.setScaleX(scale);
  largeTextView.setScaleY(scale);
  setInterpolatedTitleMargins(bezierOutput);
}

private void updateHeaderTextSizeAndMargin ( ) { if ( isTwoPanel ) { return ; } largeTextView . setPivotX ( 0 ) ; largeTextView . setPivotY ( largeTextView . getHeight ( ) / 2 ) ; final int toolbarHeight = toolbar . getLayoutParams ( ) . height ; photoTouchInterceptOverlay . setClickable ( toolbarHeight != maximumHeaderHeight ) ; if ( toolbarHeight >= maximumHeaderHeight ) { largeTextView . setScaleX ( 1 ) ; largeTextView . setScaleY ( 1 ) ; setInterpolatedTitleMargins ( 1 ) ; return ; } final float ratio = ( toolbarHeight - minimumHeaderHeight ) / ( float ) ( maximumHeaderHeight - minimumHeaderHeight ) ; final float minimumSize = invisiblePlaceholderTextView . getHeight ( ) ; float bezierOutput ; if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . LOLLIPOP ) { bezierOutput = textSizePathInterpolator . getInterpolation ( ratio ) ; } else { bezierOutput = ratio ; } float scale = ( minimumSize + ( maximumHeaderTextSize - minimumSize ) * bezierOutput ) / maximumHeaderTextSize ; bezierOutput = Math . min ( bezierOutput , 1.0f ) ; scale = Math . min ( scale , 1.0f ) ; largeTextView . setScaleX ( scale ) ; largeTextView . setScaleY ( scale ) ; setInterpolatedTitleMargins ( bezierOutput ) ; }
set the header size and padding , based on the current scroll position .
