Enum ModelView.Size

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ModelView.Size>
    Enclosing class:
    ModelView

    public static enum ModelView.Size
    extends java.lang.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).
    • Method Detail

      • values

        public static ModelView.Size[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ModelView.Size c : ModelView.Size.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ModelView.Size valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null