private void translateHeader(float of){
  float ofCalculated=of * mScrollMultiplier;
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && of < mHeaderView.getHeight()) {
    mHeaderView.setTranslationY(ofCalculated);
  }
 else   if (of < mHeaderView.getHeight()) {
    TranslateAnimation anim=new TranslateAnimation(0,0,ofCalculated,ofCalculated);
    anim.setFillAfter(true);
    anim.setDuration(0);
    mHeaderView.startAnimation(anim);
  }
  mHeaderView.setClipY(Math.round(ofCalculated));
  if (mParallaxScrollListener != null) {
    final RecyclerView.ViewHolder holder=mRecyclerView.findViewHolderForAdapterPosition(0);
    float left;
    if (holder != null) {
      left=Math.min(1,((ofCalculated) / (mHeaderView.getHeight() * mScrollMultiplier)));
    }
 else {
      left=1;
    }
    mParallaxScrollListener.onParallaxScroll(left,of,mHeaderView);
  }
}

private void translateHeader ( float of ) { float ofCalculated = of * mScrollMultiplier ; if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . HONEYCOMB && of < mHeaderView . getHeight ( ) ) { mHeaderView . setTranslationY ( ofCalculated ) ; } else if ( of < mHeaderView . getHeight ( ) ) { TranslateAnimation anim = new TranslateAnimation ( 0 , 0 , ofCalculated , ofCalculated ) ; anim . setFillAfter ( true ) ; anim . setDuration ( 0 ) ; mHeaderView . startAnimation ( anim ) ; } mHeaderView . setClipY ( Math . round ( ofCalculated ) ) ; if ( mParallaxScrollListener != null ) { final RecyclerView . ViewHolder holder = mRecyclerView . findViewHolderForAdapterPosition ( 0 ) ; float left ; if ( holder != null ) { left = Math . min ( 1 , ( ( ofCalculated ) / ( mHeaderView . getHeight ( ) * mScrollMultiplier ) ) ) ; } else { left = 1 ; } mParallaxScrollListener . onParallaxScroll ( left , of , mHeaderView ) ; } }
translates the adapter in y
