question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React-native / Splash-Screen appear when showing keyboard

See original GitHub issue

🐛 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® Xeon® CPU E5-1603 v4 @ 2.80GHz Memory: 9.57 GB / 15.92 GB Binaries: npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
dulmandakhcommented, Feb 25, 2019

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

0reactions
makarkotlovcommented, Dec 20, 2019

same

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Android] Splash screen image is shown when keyboard ...
In our project we use the following package to resolve this issue: React native background color. Make sure to check that the platform...
Read more >
React-native / Splash-Screen appear when showing keyboard
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...
Read more >
Building a splash screen in React Native - LogRocket Blog
Learn how to build a splash screen in React Native for both iOS and Android apps, and edit its features, like background color....
Read more >
Change splash screen in React Native Android app - Medium
Change splash screen in React Native Android app. This how it looks like at my app. I'm new at making react-native apps, but...
Read more >
How to add a Splash Screen and an App Icon in React Native
In this tutorial, let's learn how to use an awesome package called react-native-bootsplash to display a splash screen when an app starts and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found