I am using an ImageView
in Android where I initially set the layout_height
and layout_width
to wrap_content
as well as set the maxHeight
and maxWidth
attributes.
This is how it looks like in my layout:
<ImageView
android:id="@+id/profileImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="226dp"
android:maxHeight="174dp"
android:background="@drawable/photo" />
But when I pick a picture from the gallery then it covers my entire screen, ignoring the maxWidth
and maxHeight
. How can I resolve this issue ?