FacetProviderAdapter


public 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 methods

abstract @Nullable FacetProvider
getFacetProvider(int type)

Queries FacetProvider for a given type within Adapter.

Public methods

getFacetProvider

Added in 1.0.0-alpha03
abstract @Nullable FacetProvider getFacetProvider(int type)

Queries FacetProvider for a given type within Adapter.

Parameters
int type

type of the item.

Returns
@Nullable FacetProvider

Facet provider for the type.