GridLayoutManager
open class GridLayoutManager : LinearLayoutManager
kotlin.Any | |||
↳ | androidx.recyclerview.widget.RecyclerView.LayoutManager | ||
↳ | androidx.recyclerview.widget.LinearLayoutManager | ||
↳ | androidx.recyclerview.widget.GridLayoutManager |
A RecyclerView.LayoutManager
implementations that lays out items in a grid.
By default, each item occupies 1 span. You can change it by providing a custom SpanSizeLookup
instance via setSpanSizeLookup(SpanSizeLookup)
.
Summary
Nested classes | |
---|---|
Default implementation for |
|
open |
LayoutParams used by GridLayoutManager. |
abstract |
A helper class to provide the number of spans each item occupies. |
Constants | |
---|---|
static Int |
Inherited constants | |
---|---|
Public constructors | |
---|---|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int) Constructor used when layout manager is set in XML by RecyclerView attribute "layoutManager". |
|
Creates a vertical GridLayoutManager |
|