I’m using React Native to create an Android app, using Android Studio and an emulator. I’m working on it’s splashscreen first but I’m having trouble putting color behind the logo of the app. The picture being used is 193 x 192 with 96 DPI.
splash screen image with gray on top and bottom within emulator
I’ve tried setting
<item name="android:windowBackground">@color/blue</item>
in styles.xml but that changes the wrong thing. Any ideas?
2
Answers
This is how it works in Expo in app.json
https://docs.expo.dev/versions/latest/config/app/#backgroundcolor
In your
launch_screen.xml
file’s Relative Layout, you need to add background prop likeandroid:background="@color/blue"
.So, it will look like this,