FacetProviderAdapter


interface FacetProviderAdapter

Known direct subclasses

Optional interface that implemented by androidx.recyclerview.widget.RecyclerView.Adapter to query FacetProvider for a given item view type within Adapter. Note that androidx.recyclerview.widget.RecyclerView.ViewHolder may also implement FacetProvider which has a higher priority than the one returned fromgetFacetProvider.

A typical use case of FacetProvider is that VerticalGridView/HorizontalGridView retrieves ItemAlignmentFacet for a ViewHolder or a item view type.

Summary

Public functions

FacetProvider?

Queries FacetProvider for a given type within Adapter.

Public functions

getFacetProvider

Added in 1.0.0-alpha03
fun getFacetProvider(type: Int): FacetProvider?

Queries FacetProvider for a given type within Adapter.

Parameters
type: Int

type of the item.

Returns
FacetProvider?

Facet provider for the type.