epoxy-adapter / com.airbnb.epoxy / EpoxyController / buildModels

buildModels

protected abstract fun buildModels(): Unit

Subclasses should implement this to describe what models should be shown for the current state. Implementations should call either #add(EpoxyModel), , or EpoxyModel#addIf(boolean, EpoxyController) with the models that should be shown, in the order that is desired.

Once a model is added to the controller it should be treated as immutable and never modified again. This is necessary for adapter updates to be accurate. If "validateEpoxyModelUsage" is enabled then runtime validations will be done to make sure models are not changed.

You CANNOT call this method directly. Instead, call #requestModelBuild() to have the controller schedule an update.