public enum ViewScaleType extends java.lang.Enum<ViewScaleType>
FIT_INSIDE and CROP| Enum Constant and Description |
|---|
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.
|
FIT_INSIDE
Scale the image uniformly (maintain the image's aspect ratio) so that at least one dimension (width or height) of
the image will be equal to or less the corresponding dimension of the view.
|
| Modifier and Type | Method and Description |
|---|---|
static ViewScaleType |
fromImageView(android.widget.ImageView imageView)
Defines scale type of ImageView.
|
static ViewScaleType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ViewScaleType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ViewScaleType FIT_INSIDE
public static final ViewScaleType CROP
public static ViewScaleType[] values()
for (ViewScaleType c : ViewScaleType.values()) System.out.println(c);
public static ViewScaleType 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 nullpublic static ViewScaleType fromImageView(android.widget.ImageView imageView)
imageView - ImageViewFIT_INSIDE for
ImageView.ScaleType.FIT_CENTERImageView.ScaleType.FIT_XYImageView.ScaleType.FIT_STARTImageView.ScaleType.FIT_ENDImageView.ScaleType.CENTER_INSIDECROP for
ImageView.ScaleType.CENTERImageView.ScaleType.CENTER_CROPImageView.ScaleType.MATRIX