@Target(value=TYPE)
@Retention(value=CLASS)
public @interface ModelView
ModelProp
See https://github.com/airbnb/epoxy/wiki/Generating-Models-from-View-Annotations
| Modifier and Type | Optional Element and Description |
|---|---|
ModelView.Size |
autoLayout
If set to an option besides
ModelView.Size.NONE Epoxy will create an instance of this view
programmatically at runtime instead of inflating the view from xml. |
java.lang.Class<?> |
baseModelClass
An optional EpoxyModel subclass to use as the base class of the generated view.
|
int |
defaultLayout
The layout file to use in the generated model to inflate the view.
|
boolean |
fullSpan
True to have the generated model take up the total available span count.
|
boolean |
saveViewState
Whether the model should save view state when unbound.
|
public abstract ModelView.Size autoLayout
ModelView.Size.NONE Epoxy will create an instance of this view
programmatically at runtime instead of inflating the view from xml. This is an alternative to
using defaultLayout(), and is a good option if you just need to specify layout
parameters on your view with no other styling.
The size option you choose will define which layout parameters Epoxy uses at runtime when creating the view.
@LayoutRes public abstract int defaultLayout
PackageModelViewConfig or autoLayout() is used.
Overrides any default set in PackageModelViewConfig
public abstract java.lang.Class<?> baseModelClass
PackageModelViewConfig
* Overrides any default set in PackageModelViewConfig