react-native-splash-screen
react-native-splash-screen copied to clipboard
React Native Splash Screen image too big and offscreen
I installed react-native-splash-screen and correctly setup everything but my logo image is shown streched and offscreen (appears too big).
https://i.imgur.com/oe6taN4.jpg
I used App Icon Generator website and placed the generated images into each drawable folder with the correct names: https://www.appicon.co/
My launch_screen.xml file:
<?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"
android:layout_centerInParent="true"
/>
</RelativeLayout>
I'm facing same issue
Fixed by setting android:scaleType="centerInside" and adding android:background="#ffffff" to <RelativeLayout> to fill the void.
change the scaleType like as android:scaleType="center"