I use ImageView to show a picture, I want picture to show in a rect, which is smaller than its real size, but I want picture can completely show in the rect. I set other scaleType, such as 'centerInside', then the picture cannot show in the rect, but 'center' can. I wanna know that how to code that can show a picture in a rect which is smaller then itself.
<ImageView
android:id="@+id/imageView2"
android:layout_width="20.0dip"
android:layout_height="20.0dip"
android:adjustViewBounds="true"
android:contentDescription="@string/boy"
android:paddingLeft="20.0dip"
android:paddingTop="40.0dip"
android:scaleType="center"
android:src="@drawable/boy" />