FacetProviderAdapter
interface FacetProviderAdapter
ItemBridgeAdapter |
Bridge from |
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? |
getFacetProvider(type: Int)Queries |
Public functions
getFacetProvider
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. |