Enum Class ModelView.Size

java.lang.Object
java.lang.Enum<ModelView.Size>
com.airbnb.epoxy.ModelView.Size
All Implemented Interfaces:
Serializable, Comparable<ModelView.Size>, Constable
Enclosing class:
ModelView

public static enum ModelView.Size extends Enum<ModelView.Size>
Use with ModelView.autoLayout() to declare what layout parameters should be used to size your view when it is added to a RecyclerView. This maps to the LayoutParams options layout_width and layout_height. If you want to set the LayoutParams manually, you can use MANUAL and set the params in the View's constructor when it is initialized (a runtime exception will be thrown if layout params are not set during view instantiation when MANUAL is used).
  • Enum Constant Details

    • NONE

      public static final ModelView.Size NONE
    • MANUAL

      public static final ModelView.Size MANUAL
    • WRAP_WIDTH_WRAP_HEIGHT

      public static final ModelView.Size WRAP_WIDTH_WRAP_HEIGHT
    • WRAP_WIDTH_MATCH_HEIGHT

      public static final ModelView.Size WRAP_WIDTH_MATCH_HEIGHT
    • MATCH_WIDTH_WRAP_HEIGHT

      public static final ModelView.Size MATCH_WIDTH_WRAP_HEIGHT
    • MATCH_WIDTH_MATCH_HEIGHT

      public static final ModelView.Size MATCH_WIDTH_MATCH_HEIGHT
  • Method Details

    • values

      public static ModelView.Size[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ModelView.Size valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null