private void refreshHeaderColumnViewHolder ( ViewHolder holder ) { int left = getEmptySpace ( ) + mManager . getColumnsWidth ( 0 , Math . max ( 0 , holder . getColumnIndex ( ) ) ) ; if ( ! isRTL ( ) ) { left += mManager . getHeaderRowWidth ( ) ; } int top = mSettings . isHeaderFixed ( ) ? 0 : - mState . getScrollY ( ) ; View view = holder . getItemView ( ) ; int leftMargin = holder . getColumnIndex ( ) * mSettings . getCellMargin ( ) + mSettings . getCellMargin ( ) ; int topMargin = holder . getRowIndex ( ) * mSettings . getCellMargin ( ) + mSettings . getCellMargin ( ) ; if ( holder . isDragging ( ) && mDragAndDropPoints . getOffset ( ) . x > 0 ) { left = mState . getScrollX ( ) + mDragAndDropPoints . getOffset ( ) . x - view . getWidth ( ) / 2 ; view . bringToFront ( ) ; } if ( holder . isDragging ( ) ) { View leftShadow = mShadowHelper . getLeftShadow ( ) ; View rightShadow = mShadowHelper . getRightShadow ( ) ; if ( leftShadow != null ) { int shadowLeft = left - mState . getScrollX ( ) ; leftShadow . layout ( Math . max ( mManager . getHeaderRowWidth ( ) - mState . getScrollX ( ) , shadowLeft - SHADOW_THICK ) + leftMargin , 0 , shadowLeft + leftMargin , mSettings . getLayoutHeight ( ) ) ; leftShadow . bringToFront ( ) ; } if ( rightShadow != null ) { int shadowLeft = left + mManager . getColumnWidth ( holder . getColumnIndex ( ) ) - mState . getScrollX ( ) ; rightShadow . layout ( Math . max ( mManager . getHeaderRowWidth ( ) - mState . getScrollX ( ) , shadowLeft ) + leftMargin , 0 , shadowLeft + SHADOW_THICK + leftMargin , mSettings . getLayoutHeight ( ) ) ; rightShadow . bringToFront ( ) ; } } int viewPosLeft = left - mState . getScrollX ( ) + leftMargin ; int viewPosRight = viewPosLeft + mManager . getColumnWidth ( holder . getColumnIndex ( ) ) ; int viewPosTop = top + topMargin ; int viewPosBottom = viewPosTop + mManager . getHeaderColumnHeight ( ) ; //noinspection ResourceType view . layout ( viewPosLeft , viewPosTop , viewPosRight , viewPosBottom ) ; if ( mState . isRowDragging ( ) ) { view . bringToFront ( ) ; } if ( ! mState . isColumnDragging ( ) ) { View shadow = mShadowHelper . getColumnsHeadersShadow ( ) ; if ( shadow == null ) { shadow = mShadowHelper . addColumnsHeadersShadow ( this ) ; } //noinspection ResourceType shadow . layout ( mState . isRowDragging ( ) ? 0 : mSettings . isHeaderFixed ( ) ? 0 : - mState . getScrollX ( ) , top + mManager . getHeaderColumnHeight ( ) , mSettings . getLayoutWidth ( ) , top + mManager . getHeaderColumnHeight ( ) + SHADOW_HEADERS_THICK ) ; shadow . bringToFront ( ) ; } }
Refresh current column header view holder .