public enum ImageScaleType extends java.lang.Enum<ImageScaleType>
Enum Constant and Description |
---|
EXACTLY
Image will scaled-down exactly to target size (scaled width or height or both will be equal to target size;
depends on ImageView's scale type).
|
EXACTLY_STRETCHED
Image will scaled exactly to target size (scaled width or height or both will be equal to target size; depends on
ImageView's scale type).
|
IN_SAMPLE_INT
Image will be subsampled in an integer number of times (1, 2, 3, ...).
|
IN_SAMPLE_POWER_OF_2
Image will be reduces 2-fold until next reduce step make image smaller target size.
It's fast type and it's preferable for usage in lists/grids/galleries (and other adapter-views) . Relates to BitmapFactory.Options.inSampleSize Note: If original image size is smaller than target size then original image won't be scaled. |
NONE
Image won't be scaled
|
NONE_SAFE
Image will be scaled down only if image size is greater than
maximum acceptable texture size.
|
Modifier and Type | Method and Description |
---|---|
static ImageScaleType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ImageScaleType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ImageScaleType NONE
public static final ImageScaleType NONE_SAFE
public static final ImageScaleType IN_SAMPLE_POWER_OF_2
BitmapFactory.Options.inSampleSize
public static final ImageScaleType IN_SAMPLE_INT
BitmapFactory.Options.inSampleSize
public static final ImageScaleType EXACTLY
Bitmap.createBitmap(...)
.public static final ImageScaleType EXACTLY_STRETCHED
Bitmap.createBitmap(...)
.public static ImageScaleType[] values()
for (ImageScaleType c : ImageScaleType.values()) System.out.println(c);
public static ImageScaleType 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