the aspect ratio of the image is not maintained if we using Linear layout as a parent of Splash screen
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/launch_screen">
</LinearLayout>
Change it to ImageView So user can maintain the aspect ratio of image and Use other property of ImageView
<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:scaleType="centerCrop"
android:src="@drawable/launch_screen"
>
</ImageView>
@laxmikantchhipa this is not a question you should make a pull Request for it
For my part I am doing like this which is the same result I think :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/launch_screen" android:scaleType="centerCrop" />
</RelativeLayout>
@laxmikantchhipa this is not a question you should make a pull Request for it
For my part I am doing like this which is the same result I think :
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/launch_screen" android:scaleType="centerCrop" /> </RelativeLayout>
Thank you 馃檹
Most helpful comment
@laxmikantchhipa this is not a question you should make a pull Request for it
For my part I am doing like this which is the same result I think :