add Epoxy Preloader
fun <T : EpoxyModel<*>, U : ViewMetadata?, P : PreloadRequestHolder> RecyclerView.addEpoxyPreloader(epoxyController: EpoxyController, maxPreloadDistance: Int = 3, errorHandler: PreloadErrorHandler = { context, err -> if (!context.isDebuggable) throw err }, preloader: EpoxyModelPreloader<T, U, P>, requestHolderFactory: () -> P)
Content copied to clipboard
Helper to create and add an EpoxyPreloader to this RecyclerView.
If you are using com.airbnb.epoxy.EpoxyRecyclerView, prefercom.airbnb.epoxy.EpoxyRecyclerView.addPreloader instead.
Parameters
maxPreloadDistance
How many items to prefetch ahead of the last bound item
errorHandler
Called when the preloader encounters an exception. By default this throws only if the app is not in a debuggle model
preloader
Describes how view content for the EpoxyModel should be preloaded
requestHolderFactory
Should create and return a new PreloadRequestHolder each time it is invoked