@MainThread public abstract class RecyclerViewOwner extends Object
| Constructor and Description |
|---|
RecyclerViewOwner() |
| Modifier and Type | Method and Description |
|---|---|
protected RecyclerView |
getRecyclerView()
Returns a RecyclerView instance this class is bond to.
|
protected abstract void |
onAttachedToRecyclerView(RecyclerView recyclerView)
Called by RecyclerViewOwner when RecyclerView is attached.
|
protected abstract void |
onDetachedFromRecyclerView(RecyclerView recyclerView)
Called by RecyclerViewOwner when RecyclerView is detached.
|
void |
setRecyclerView(RecyclerView recyclerView)
Attaches the RecyclerViewOwner to the provided RecyclerView.
|
public void setRecyclerView(@Nullable RecyclerView recyclerView)
null to detach it from the current RecyclerView.recyclerView - The RecyclerView instance to which you want to add this helper or
null if you want to remove RecyclerViewOwner from the current
RecyclerView.@Nullable protected RecyclerView getRecyclerView()
protected abstract void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView)
recyclerView - The RecyclerView instance.onDetachedFromRecyclerView(RecyclerView)protected abstract void onDetachedFromRecyclerView(@NonNull RecyclerView recyclerView)
recyclerView - The RecyclerView instance.onAttachedToRecyclerView(RecyclerView)