React-native: React-native / Splash-Screen appear when showing keyboard

Created on 25 Feb 2019  路  7Comments  路  Source: facebook/react-native

馃悰 Bug Report

I added a splash-screen to my react native project, everything works fine exept when i open the keyboard it show briefly the splash-screen behind it.
Video :
https://drive.google.com/open?id=14ahrc-dyYnNEYAAX3iMQVwqqV6fVo_xG

To Reproduce

create background_splash.xml in drawable with this code in it :

 <?xml version="1.0" encoding="utf-8" ?>

<layer-list 
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/primary"/>
</layer-list>

Then add it in the styles.xml file

<item name="android:windowBackground">
     @drawable/background_splash
</item>

Expected Behavior

The splash-screen should not display when the keyboard appears.

Code Example

Everything is in the To Reproduce tab, you just need to add a TextInput for it to appear.

Environment

React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Xeon(R) CPU E5-1603 v4 @ 2.80GHz
Memory: 9.57 GB / 15.92 GB
Binaries:
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

Keyboard Bug Locked

All 7 comments

you're setting window background in the theme, and will show-up in random way. please use other ways to show splash.

Can you tell me some other ways ?

what is this mean another way ?

We are experiencing the same issue. Any resolution for this?

Hi @HarikaSabbella, no resolution but I found a workaround, see my answer here.

Module react-native-background-color does not exist in the Haste module map

same

Was this page helpful?
0 / 5 - 0 ratings