I'm creating an activity on Android. I want to show a background image in it. I put a ImageView into my main RelativeLayout.
<RelativeLayout
android:id="@+id/relativeLayoutMain"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:orientation="vertical" >
<ImageView
android:id="@+id/bgImage"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:src="@drawable/bg4"
android:scaleType="centerCrop" />
</RelativeLayout>
It makes view like this.
I need to make view like this
How can I do it?
Try set ImageView attribute ScaleType=fitEnd
?
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