Maximum width and height for ImageView in Android
问题 So I have an ImageView set with android:maxHeight="100px" android:maxWidth="250px" android:minHeight="100px" android:minWidth="250px" android:scaleType="centerInside" This image view is used to show a picture that is obtained from the gallery or camera. In both cases, the image is not resized to fit inside the imageview, it just stretches its space as much as it needs. Any idea how to make it stay inside those bounds? <?xml version="1.0" encoding="utf-8"?> <EditText android:layout_height=