-
- All Implemented Interfaces:
-
com.airbnb.epoxy.AsyncEpoxyDiffer.ResultCallback,com.airbnb.epoxy.stickyheader.StickyHeaderCallbacks
public final class EpoxyControllerAdapter extends BaseEpoxyAdapter implements AsyncEpoxyDiffer.ResultCallback
-
-
Field Summary
Fields Modifier and Type Field Description private intitemCount
-
Method Summary
Modifier and Type Method Description intgetItemCount()booleanisDiffInProgress()voidonResult(@NonNull() DiffResult result)voidaddModelBuildListener(OnModelBuildFinishedListener listener)voidremoveModelBuildListener(OnModelBuildFinishedListener listener)voidonAttachedToRecyclerView(@NonNull() RecyclerView recyclerView)voidonDetachedFromRecyclerView(@NonNull() RecyclerView recyclerView)voidonViewAttachedToWindow(@NonNull() EpoxyViewHolder holder)voidonViewDetachedFromWindow(@NonNull() EpoxyViewHolder holder)List<EpoxyModel<out Object>>getCopyOfModels()Get an unmodifiable copy of the current models set on the adapter. EpoxyModel<out Object>getModelAtPosition(int position)EpoxyModel<out Object>getModelById(long id)Searches the current model list for the model with the given id. intgetModelPosition(@NonNull() EpoxyModel<out Object> targetModel)Finds the position of the given model in the list. BoundViewHoldersgetBoundViewHolders()Returns an object that manages the view holders currently bound to the RecyclerView. booleanisStickyHeader(int position)Delegates the callbacks received in the adapterto the controller. voidsetupStickyHeaderView(@NotNull() View stickyHeader)Delegates the callbacks received in the adapterto the controller. voidteardownStickyHeaderView(@NotNull() View stickyHeader)Delegates the callbacks received in the adapterto the controller. -
Methods inherited from class com.airbnb.epoxy.BaseEpoxyAdapter
getItemId, getItemViewType, getSpanCount, getSpanSizeLookup, isEmpty, isMultiSpan, onBindViewHolder, onBindViewHolder, onCreateViewHolder, onFailedToRecycleView, onRestoreInstanceState, onSaveInstanceState, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, setSpanCount -
Methods inherited from class androidx.recyclerview.widget.RecyclerView.Adapter
bindViewHolder, createViewHolder, findRelativeAdapterPositionIn, getItemCount, getItemId, getItemViewType, getStateRestorationPolicy, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onCreateViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, setStateRestorationPolicy, unregisterAdapterDataObserver -
Methods inherited from class com.airbnb.epoxy.stickyheader.StickyHeaderCallbacks
isStickyHeader, setupStickyHeaderView, teardownStickyHeaderView -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getItemCount
int getItemCount()
-
isDiffInProgress
boolean isDiffInProgress()
-
onResult
void onResult(@NonNull() DiffResult result)
-
addModelBuildListener
void addModelBuildListener(OnModelBuildFinishedListener listener)
-
removeModelBuildListener
void removeModelBuildListener(OnModelBuildFinishedListener listener)
-
onAttachedToRecyclerView
void onAttachedToRecyclerView(@NonNull() RecyclerView recyclerView)
-
onDetachedFromRecyclerView
void onDetachedFromRecyclerView(@NonNull() RecyclerView recyclerView)
-
onViewAttachedToWindow
void onViewAttachedToWindow(@NonNull() EpoxyViewHolder holder)
-
onViewDetachedFromWindow
void onViewDetachedFromWindow(@NonNull() EpoxyViewHolder holder)
-
getCopyOfModels
@NonNull() List<EpoxyModel<out Object>> getCopyOfModels()
Get an unmodifiable copy of the current models set on the adapter.
-
getModelAtPosition
@NonNull() EpoxyModel<out Object> getModelAtPosition(int position)
-
getModelById
@Nullable() EpoxyModel<out Object> getModelById(long id)
Searches the current model list for the model with the given id. Returns the matching model ifone is found, otherwise null is returned.
-
getModelPosition
int getModelPosition(@NonNull() EpoxyModel<out Object> targetModel)
Finds the position of the given model in the list. Doesn't use indexOf to avoid unnecessaryequals() calls since we're looking for the same object instance.
-
getBoundViewHolders
@NonNull() BoundViewHolders getBoundViewHolders()
Returns an object that manages the view holders currently bound to the RecyclerView. Thisobject is mainly used by the base Epoxy adapter to save view states, but you may find it usefulto help access views or models currently shown in the RecyclerView.
-
isStickyHeader
boolean isStickyHeader(int position)
Delegates the callbacks received in the adapterto the controller.
-
setupStickyHeaderView
void setupStickyHeaderView(@NotNull() View stickyHeader)
Delegates the callbacks received in the adapterto the controller.
-
teardownStickyHeaderView
void teardownStickyHeaderView(@NotNull() View stickyHeader)
Delegates the callbacks received in the adapterto the controller.
-
-
-
-