StaggeredGridLayoutManager

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

Constructor used when layout manager is set in XML by RecyclerView attribute "layoutManager". Defaults to single column and vertical.


constructor(spanCount: Int, orientation: Int)(source)

Creates a StaggeredGridLayoutManager with given parameters.

Parameters

spanCount

If orientation is vertical, spanCount is number of columns. If orientation is horizontal, spanCount is number of rows.

orientation