react-native-splash-screen icon indicating copy to clipboard operation
react-native-splash-screen copied to clipboard

React Native Splash Screen image too big and offscreen

Open Gabotron-ES opened this issue 2 years ago • 3 comments

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>

Gabotron-ES avatar Feb 05 '23 16:02 Gabotron-ES

I'm facing same issue

rajat-mobileCoder avatar Feb 21 '23 12:02 rajat-mobileCoder

Fixed by setting android:scaleType="centerInside" and adding android:background="#ffffff" to <RelativeLayout> to fill the void.

bitdriftr avatar Mar 06 '23 21:03 bitdriftr

change the scaleType like as android:scaleType="center"

Salmankhan033 avatar May 04 '23 07:05 Salmankhan033