I am making an image with my s4 Samsung device which I am trying to put as splash image for my app but I am facing problem that the Image is being displayed with wide white space Frame. How can I remove it?
XML file:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/fl_draw"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/splash_background"
android:rotation="90"
android:adjustViewBounds="true" />
</FrameLayout>
</RelativeLayout>
I have displayed the Image in LinearLayout as the code below before but it was shown horozintal:
Code before:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background= "@drawable/splash_background"
>
</LinearLayout>
Screenshot before trying the solution of Hasan:
After trying hassan solution android:scaleType="centerCrop"