In Android, I defined an ImageView
\'s layout_width
to be fill_parent
(which takes up the full width of the phone).
If the imag
To anyone else having this particular issue. You have an ImageView
that you want to have a width of fill_parent
and a height scaled proportionately:
Add these two attributes to your ImageView
:
android:adjustViewBounds="true"
android:scaleType="centerCrop"
And set the ImageView
width to fill_parent
and height to wrap_content
.
Also, if you don't want your image to be cropped, try this:
android:adjustViewBounds="true"
android:layout_centerInParent="true"