GridLayoutManager

constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int)(source)

Constructor used when layout manager is set in XML by RecyclerView attribute "layoutManager". If spanCount is not specified in the XML, it defaults to a single column. spanCount


constructor(context: Context, spanCount: Int)(source)

Creates a vertical GridLayoutManager

Parameters

context

Current context, will be used to access resources.

spanCount

The number of columns in the grid


constructor(context: Context, spanCount: Int, orientation: Int, reverseLayout: Boolean)(source)

Parameters

context

Current context, will be used to access resources.

spanCount

The number of columns or rows in the grid

orientation

Layout orientation. Should be HORIZONTAL or VERTICAL.

reverseLayout

When set to true, layouts from end to start.