recycler-view-divider / com.fondesa.recyclerviewdivider / Grid

Grid

data class Grid

Identifies the grid layout of a LinearLayoutManager/GridLayoutManager. The grid pre-calculates all the rows and columns placement of a layout manager. A vertical grid is a grid shown in a layout manager with vertical orientation. An horizontal grid is a grid shown in a layout manager with horizontal orientation.

Parameters

spanCount - the number of possible columns in a vertical grid or the number of possible rows in an horizontal grid.

orientation - Orientation.VERTICAL if the grid is vertical, Orientation.HORIZONTAL if the grid is horizontal.

layoutDirection - identifies if the grid is top-to-bottom, right-to-left, bottom-to-top, left-to-right.

lines - the rows in a vertical grid, the columns in an horizontal grid.

Constructors

<init>

Grid(spanCount: Int, orientation: Orientation, layoutDirection: LayoutDirection, lines: List<Line>)

Identifies the grid layout of a LinearLayoutManager/GridLayoutManager. The grid pre-calculates all the rows and columns placement of a layout manager. A vertical grid is a grid shown in a layout manager with vertical orientation. An horizontal grid is a grid shown in a layout manager with horizontal orientation.

Properties

layoutDirection

val layoutDirection: LayoutDirection

identifies if the grid is top-to-bottom, right-to-left, bottom-to-top, left-to-right.

lines

val lines: List<Line>

the rows in a vertical grid, the columns in an horizontal grid.

linesCount

val linesCount: Int

orientation

val orientation: Orientation

Orientation.VERTICAL if the grid is vertical, Orientation.HORIZONTAL if the grid is horizontal.

spanCount

val spanCount: Int

the number of possible columns in a vertical grid or the number of possible rows in an horizontal grid.