缩放 Android 可绘制以填满整个屏幕

Scale Android drawable to fill whole screen

有一张图片设置为 activity 的背景。我想缩放图像,使其始终像示例中那样填满整个屏幕,而不会过度缩放。如何实现?

试试这个

<ImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/nSx3W"
    android:scaleType="centerCrop"/>