1.center 保持图片原尺寸,并使其位于视图中间
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="center"
android:src="@drawable/view" />

2.centerCrop 拉伸图片使其充满视图,并位于视图中间
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="@drawable/view" />

3.centerInside 保持宽高比例,缩小图片使之位于视图中间(只缩小不放大)
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/view" />

4.fitCenter 保持宽高比例,拉伸图片使其位于视图中间(默认值)
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"
android:src="@drawable/view" />

5.fitStart 保持宽高比例,拉伸图片使其位于视图上方或左侧
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitStart"
android:src="@drawable/view" />

6.fitEnd 保持宽高比例,拉伸图片使其位于视图下方或右侧
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitEnd"
android:src="@drawable/view" />

7.fitXY 拉伸图片使其正好填满视图(图片可能被拉伸变形)
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@drawable/view" />

ImageButton(可以给按钮添加图片)
<!-- 默认缩放类型为center-->
<ImageButton
android:layout_width="match_parent"
android:layout_height="200dp"
android:src="@drawable/view" />
