O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.

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 SpanSizeLookup.

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".

<init>(context: Context!, spanCount: Int)

Creates a vertical GridLayoutManager

<init>(context: Context!, spanCount: Int, orientation: Int, reverseLayout: Boolean)

Public methods
open Boolean

open Int

open Int

open Int

open Int

open RecyclerView.LayoutParams!

open RecyclerView.LayoutParams!

open RecyclerView.LayoutParams!

open Int

open Int

open Int

Returns the number of spans laid out by this grid.

open GridLayoutManager.SpanSizeLookup!

Returns the current <