Package com.airbnb.epoxy
Annotation Type ModelView
-
@Target(TYPE) @Retention(CLASS) public @interface ModelViewAn annotation on custom view classes to automatically generate an EpoxyModel for that view. Used in conjunction withModelPropSee https://github.com/airbnb/epoxy/wiki/Generating-Models-from-View-Annotations
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description ModelView.SizeautoLayoutIf set to an option besidesModelView.Size.NONEEpoxy will create an instance of this view programmatically at runtime instead of inflating the view from xml.java.lang.Class<?>baseModelClassAn optional EpoxyModel subclass to use as the base class of the generated view.intdefaultLayoutThe layout file to use in the generated model to inflate the view.booleanfullSpanTrue to have the generated model take up the total available span count.booleansaveViewStateWhether the model should save view state when unbound.
-
-
-
Element Detail
-
autoLayout
ModelView.Size autoLayout
If set to an option besidesModelView.Size.NONEEpoxy will create an instance of this view programmatically at runtime instead of inflating the view from xml. This is an alternative to usingdefaultLayout(), 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.
- Default:
- com.airbnb.epoxy.ModelView.Size.NONE
-
-
-
defaultLayout
@LayoutRes int defaultLayout
The layout file to use in the generated model to inflate the view. This is required unless a default pattern is set viaPackageModelViewConfigorautoLayout()is used.Overrides any default set in
PackageModelViewConfig- Default:
- 0
-
-
-
baseModelClass
java.lang.Class<?> baseModelClass
An optional EpoxyModel subclass to use as the base class of the generated view. A default can also be set withPackageModelViewConfig* Overrides any default set in
PackageModelViewConfig- Default:
- java.lang.Void.class
-
-