public static enum CropImageView.ScaleType extends java.lang.Enum<CropImageView.ScaleType>
| Enum Constant and Description |
|---|
CENTER
Center the image in the view, but perform no scaling.
Note: If auto-zoom is enabled and the source image is smaller than crop image view then it will be scaled uniformly to fit the crop image view. |
CENTER_CROP
Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width
and height) of the image will be equal to or larger than the corresponding dimension
of the view (minus padding).
The image is then centered in the view. |
CENTER_INSIDE
Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width
and height) of the image will be equal to or less than the corresponding dimension of
the view (minus padding).
The image is then centered in the view. Note: If auto-zoom is enabled and the source image is smaller than crop image view then it will be scaled uniformly to fit the crop image view. |
FIT_CENTER
Scale the image uniformly (maintain the image's aspect ratio) to fit in crop image view.
The largest dimension will be equals to crop image view and the second dimension will be smaller. |
| Modifier and Type | Method and Description |
|---|---|
static CropImageView.ScaleType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CropImageView.ScaleType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CropImageView.ScaleType FIT_CENTER
public static final CropImageView.ScaleType CENTER
public static final CropImageView.ScaleType CENTER_CROP
public static final CropImageView.ScaleType CENTER_INSIDE
public static CropImageView.ScaleType[] values()
for (CropImageView.ScaleType c : CropImageView.ScaleType.values()) System.out.println(c);
public static CropImageView.ScaleType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null