Enum ResponsiveUrl.Preset

java.lang.Object
java.lang.Enum<ResponsiveUrl.Preset>
com.cloudinary.android.ResponsiveUrl.Preset
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ResponsiveUrl.Preset>, java.lang.constant.Constable
Enclosing class:
ResponsiveUrl

public static enum ResponsiveUrl.Preset
extends java.lang.Enum<ResponsiveUrl.Preset>
Ready made presets for common responsive use cases
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    AUTO_FILL
    Adjusts both height and width of the image, retaining the aspect-ratio, to fill the ImageView, using automatic gravity to determine which part of the image is visible.
    FIT
    Adjusts both height and width of the image, retaining the aspect-ratio, to completely fit within the bounds of the ImageView.
  • Method Summary

    Modifier and Type Method Description
    ResponsiveUrl get​(com.cloudinary.Cloudinary cloudinary)
    Build an instance of ResponsiveUrl pre-configured according to the preset.
    static ResponsiveUrl.Preset valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static ResponsiveUrl.Preset[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • AUTO_FILL

      public static final ResponsiveUrl.Preset AUTO_FILL
      Adjusts both height and width of the image, retaining the aspect-ratio, to fill the ImageView, using automatic gravity to determine which part of the image is visible. Some cropping may occur. Similar to ImageView.ScaleType.CENTER_CROP
    • FIT

      public static final ResponsiveUrl.Preset FIT
      Adjusts both height and width of the image, retaining the aspect-ratio, to completely fit within the bounds of the ImageView. The whole image will be shown, however some blank space may be visible (letterbox). Similar ImageView.ScaleType.CENTER_INSIDE
  • Method Details

    • values

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

      public static ResponsiveUrl.Preset 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
    • get

      public ResponsiveUrl get​(com.cloudinary.Cloudinary cloudinary)
      Build an instance of ResponsiveUrl pre-configured according to the preset.
      Parameters:
      cloudinary - Cloudinary instance to use.
      Returns:
      The ResponsiveUrl instance