android.widget
public
static
final
enum
android.widget.ImageView.ScaleType
Options for scaling the bounds of an image to the bounds of this view.
Summary
Enum Values
Public Methods
Methods inherited
from class
java.lang.Enum
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Enum Values
Center the image in the view, but perform no scaling.
From XML, use this syntax: android:scaleType="center"
.
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.
From XML, use this syntax: android:scaleType="centerCrop"
.
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.
From XML, use this syntax: android:scaleType="centerInside"
.
Scale the image using
CENTER.
From XML, use this syntax:
android:scaleType="fitCenter"
.
Scale the image using
END.
From XML, use this syntax:
android:scaleType="fitEnd"
.
Scale the image using
START.
From XML, use this syntax:
android:scaleType="fitStart"
.
Scale the image using
FILL.
From XML, use this syntax:
android:scaleType="fitXY"
.
Scale using the image matrix when drawing. The image matrix can be set using
setImageMatrix(Matrix). From XML, use this syntax:
android:scaleType="matrix"
.
Public Methods