private void initClipRectForHeader(Rect clipRect, RecyclerView recyclerView, View header) {
    mDimensionCalculator.initMargins(clipRect, header);
    if (mOrientationProvider.getOrientation(recyclerView) == LinearLayout.VERTICAL) {
      clipRect.set(
          recyclerView.getPaddingLeft(),
          recyclerView.getPaddingTop(),
          recyclerView.getWidth() - recyclerView.getPaddingRight() - clipRect.right,
          recyclerView.getHeight() - recyclerView.getPaddingBottom());
    } else {
        clipRect.set(
          recyclerView.getPaddingLeft(),
          recyclerView.getPaddingTop(),
          recyclerView.getWidth() - recyclerView.getPaddingRight(),
          recyclerView.getHeight() - recyclerView.getPaddingBottom() - clipRect.bottom);
    }
  }
Initializes a clipping rect for the header based on the margins of the header and the padding of the
recycler.
FIXME: Currently right margin in VERTICAL orientation and bottom margin in HORIZONTAL
orientation are clipped so they look accurate, but the headers are not being drawn at the
correctly smaller width and height respectively.

@param clipRect {@link Rect} for clipping a provided header to the padding of a recycler view
@param recyclerView for which to provide a header
@param header       for clipping
library/src/main/java/com/timehop/stickyheadersrecyclerview/rendering/HeaderRenderer.java