abstract class BaseEpoxyAdapter : Adapter<EpoxyViewHolder!>, StickyHeaderCallbacks
BaseEpoxyAdapter() |
open fun getBoundViewHolders(): BoundViewHolders!
Returns an object that manages the view holders currently bound to the RecyclerView. This object is mainly used by the base Epoxy adapter to save view states, but you may find it useful to help access views or models currently shown in the RecyclerView. |
|
open fun getItemCount(): Int |
|
open fun getItemId(position: Int): Long |
|
open fun getItemViewType(position: Int): Int |
|
open fun getModelPosition(model: EpoxyModel<*>!): Int
Finds the position of the given model in the list. Doesn't use indexOf to avoid unnecessary equals() calls since we're looking for the same object instance. |
|
open fun getSpanCount(): Int |
|
open fun getSpanSizeLookup(): SpanSizeLookup!
For use with a grid layout manager - use this to get the |
|
open fun isEmpty(): Boolean |
|
open fun isMultiSpan(): Boolean |
|
open fun isStickyHeader(position: Int): Boolean
Called to check if the item at the position is a sticky item, by default returns false. |
|
open fun onBindViewHolder(holder: EpoxyViewHolder, position: Int): Unitopen fun onBindViewHolder(holder: EpoxyViewHolder, position: Int, payloads: MutableList<Any!>): Unit |
|
open fun onCreateViewHolder(parent: ViewGroup, viewType: Int): EpoxyViewHolder |
|
open fun onDetachedFromRecyclerView(recyclerView: RecyclerView): Unit |
|
open fun onExceptionSwallowed(exception: RuntimeException!): Unit
This is called when recoverable exceptions happen at runtime. They can be ignored and Epoxy will recover, but you can override this to be aware of when they happen. |
|
open fun onFailedToRecycleView(holder: EpoxyViewHolder): Boolean |
|
open fun onModelBound(holder: EpoxyViewHolder!, model: EpoxyModel<*>!, position: Int, payloads: MutableList<Any!>?): Unitopen fun onModelBound(holder: EpoxyViewHolder!, model: EpoxyModel<*>!, position: Int): Unit
Called immediately after a model is bound to a view holder. Subclasses can override this if they want alerts on when a model is bound. |
|
open fun onModelUnbound(holder: EpoxyViewHolder!, model: EpoxyModel<*>!): Unit
Called immediately after a model is unbound from a view holder. Subclasses can override this if they want alerts on when a model is unbound. |
|
open fun onRestoreInstanceState(inState: Bundle?): Unit |
|
open fun onSaveInstanceState(outState: Bundle!): Unit |
|
open fun onViewAttachedToWindow(holder: EpoxyViewHolder): Unit |
|
open fun onViewDetachedFromWindow(holder: EpoxyViewHolder): Unit |
|
open fun onViewRecycled(holder: EpoxyViewHolder): Unit |
|
open fun setSpanCount(spanCount: Int): Unit
If you are using a grid layout manager you must call this to set the span count of the grid. This span count will be passed on to the models so models can choose what span count to be. |
|
open fun setupStickyHeaderView(stickyHeader: View): Unit
Optional callback to setup the sticky view, by default it doesn't do anything. |
|
open fun teardownStickyHeaderView(stickyHeader: View): Unit
Optional callback to perform tear down operation on the sticky view, by default it doesn't do anything. |
abstract class EpoxyAdapter : BaseEpoxyAdapter
Allows you to easily combine different view types in the same adapter, and handles view holder creation, binding, and ids for you. Subclasses just need to add their desired |
|
class EpoxyControllerAdapter : BaseEpoxyAdapter, ResultCallback |