private int getNumberOfRows() {
    int offset = getNumberOfItems() % getNumberOfColumns() == 0 ? 0 : 1;
    return offset + getNumberOfItems() / getNumberOfColumns();
  }
Returns the position adjacent to the provided one in a specific direction.
dividers/src/main/java/com/karumi/dividers/PositionAdapter.java