I want following type of background from my image:
This is NOT a duplicate question because I've tried following solutions:
1) First one 2) Second 3) third
What these answers suggest is use of following attributes of image view:
android:scaleType="..."
I've tried each available values for this. What I'm getting is:
Or a very small image in the center, if I use android:scaleType="center"
.
Following is my layout file for this activity:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.admin.georeminder.MainActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/view"
android:src="@mipmap/landscape"
android:scaleType="centerCrop" />
</RelativeLayout>
So what am I missing here? Any help will be appreciated! Thanks
EDIT
I've also tried following combination:
android:scaleType="fitXY"
android:adjustViewBounds="true"