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 ?
Add android:adjustViewBounds="true"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With