private void setItemOffsetsForHeader ( Rect itemOffsets , View header , int orientation ) { mDimensionCalculator . initMargins ( mTempRect , header ) ; if ( orientation == LinearLayoutManager . VERTICAL ) { itemOffsets . top = header . getHeight ( ) + mTempRect . top + mTempRect . bottom ; } else { itemOffsets . left = header . getWidth ( ) + mTempRect . left + mTempRect . right ; } }
Sets the offsets for the first item in a section to make room for the header view