Package com.cloudinary.android
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
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTO_FILLAdjusts 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.FITAdjusts 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 ResponsiveUrlget(com.cloudinary.Cloudinary cloudinary)Build an instance ofResponsiveUrlpre-configured according to the preset.static ResponsiveUrl.PresetvalueOf(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.
-
Enum Constant Details
-
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 toImageView.ScaleType.CENTER_CROP -
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). SimilarImageView.ScaleType.CENTER_INSIDE
-
-
Method Details
-
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
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 namejava.lang.NullPointerException- if the argument is null
-
get
Build an instance ofResponsiveUrlpre-configured according to the preset.- Parameters:
cloudinary- Cloudinary instance to use.- Returns:
- The
ResponsiveUrlinstance
-