docs: private void setSpacingForDirection(@NonNull final Rect outRect,
  	                                    @NonNull final RecyclerView.LayoutManager layoutManager,
  	                                    final int position,
  	                                    final int itemCount) {
  		/* Resolve display mode automatically */
  		final int displayMode = resolveDisplayMode(layoutManager);
  
  		switch (displayMode) {
  			case HORIZONTAL:
  				outRect.left = 0;
  				outRect.right = position == itemCount - 1 ? 0 : mHorizontalSpace;
  				outRect.top = 0;
  				outRect.bottom = 0;
  				break;
  			case VERTICAL:
  				outRect.left = 0;
  				outRect.right = 0;
  				outRect.top = 0;
  				outRect.bottom = position == itemCount - 1 ? 0 : mVerticalSpace;
  				break;
  			case GRID:
  				final GridLayoutManager gridLayoutManager = (GridLayoutManager) layoutManager;
  				final int cols = gridLayoutManager.getSpanCount();
  				final int rows = itemCount / cols;
  
  				outRect.left = position % cols == 0 ? 0 : mHorizontalSpace / 2;
  				outRect.right = (position + 1) % cols == 0 ? 0 : mHorizontalSpace / 2;
  				outRect.top = position < cols ? 0 : mVerticalSpace / 2;
  				outRect.bottom = position / cols == rows ? 0 : mVerticalSpace / 2;
  				break;
  		}
  	}