Reputation: 15718
In output you can see there is a white gap in start and end of the imageView.
I don't want to use android:scaleType="fitXY"
because it stretches the image. I know the gaps is because of the status bar and navigation bar the imageview tries to maintain its ratio.
Is it possible to fill the imageview without doing anything to the image source.Thanks in advance.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/plain" />
Upvotes: 0
Views: 670
Reputation: 136
Since you don't want to use fitXY,or modify the img,maybe you can use android:background="@drawable/img"
replace android:src=@drawable/img
,Did you like this?
Upvotes: 1