Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

FacetProviderAdapter

public interface FacetProviderAdapter

androidx.leanback.widget.FacetProviderAdapter


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

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

App does not need implement FacetProviderAdapter when using ObjectAdapter, Presenter and ItemBridgeAdapter. ItemBridgeAdapter implemented FacetProviderAdapter, it returns the FacetProvider implemented by Presenter which is mapped to the item view type.

For example, app calls presenter.setFacet(ItemAlignmentFacet.class, itemAlignmentFacet) to set alignment of the ViewHolders created by this Presenter.

Summary

Public methods

abstract FacetProvider getFacetProvider(int type)

Queries FacetProvider for a given type within Adapter.

Public methods

getFacetProvider

public abstract FacetProvider getFacetProvider (int type)

Queries FacetProvider for a given type within Adapter.

Parameters
type int: type of the item.

Returns
FacetProvider Facet provider for the type.