React-Native: Splash screen with resizable image (logo)

Question!

I am trying to make a simple splash screen where im setting the background color and add a image in the center, my problem is that the image its going out of the bounds and I am trying to find a way how to make it "responsive". Is there a good way how to do this with react-native/java?

What I have now:

 <?xml version="1.0" encoding="utf-8"?>
    <layer-list
      xmlns:android="http://schemas.android.com/apk/res/android">

      <item android:drawable="@color/green" />
      <item>
        <bitmap android:src="@drawable/logo"
            android:gravity="center"/>
      </item>
    </layer-list>

  <style name="SplashTheme" parent="AppTheme">
    <item name="android:windowBackground">@drawable/splash_screen</item>
  </style>
By : NinetyHH


Answers


This video can help you solving your question :)
By: admin