public Position getPositionByIndex(int index) {
    int numberOfColumns = getNumberOfColumns();
    int numberOfRows = getNumberOfRows();

    return new Position(
        index,
        (index - offset) % numberOfColumns,
        (index - offset) / numberOfColumns,
        numberOfColumns - 1,
        numberOfRows - 1);
  }
Returns a position given the absolute index.
dividers/src/main/java/com/karumi/dividers/PositionAdapter.java