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

StaggeredGridLayoutManager

open class StaggeredGridLayoutManager : RecyclerView.LayoutManager, RecyclerView.SmoothScroller.ScrollVectorProvider
kotlin.Any
   ↳ androidx.recyclerview.widget.RecyclerView.LayoutManager
   ↳ androidx.recyclerview.widget.StaggeredGridLayoutManager

A LayoutManager that lays out children in a staggered grid formation. It supports horizontal & vertical layout as well as an ability to layout children in reverse.

Staggered grids are likely to have gaps at the edges of the layout. To avoid these gaps, StaggeredGridLayoutManager can offset spans independently or move items between spans. You can control this behavior via setGapStrategy(int).

Summary

Nested classes
open

LayoutParams used by StaggeredGridLayoutManager.

Constants
static Int

static Int

When scroll state is changed to RecyclerView#SCROLL_STATE_IDLE, StaggeredGrid will check if there are gaps in the because of full span items.

static Int

Does not do anything to hide gaps.

static Int

static Int

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>(spanCount: Int, orientation: Int)

Creates a StaggeredGridLayoutManager with given parameters.

Public methods
open Unit

open Boolean

open Boolean

open Boolean

open Int

open Int

open Int

open PointF?

open Int

open Int

open Int

open IntArray!

Returns the adapter position of the first completely visible view for each span.

open IntArray!

Returns the adapter position of the first visible view for each span.

open IntArray!

Returns the adapter position of the last completely visible view for each span.

open IntArray!

Returns the adapter position of the last visible view for each span.

open RecyclerView.LayoutParams!

open RecyclerView.LayoutParams!

open RecyclerView.LayoutParams!

open Int

Returns the current gap handling strategy for StaggeredGridLayoutManager.

open Int