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.

Splash screen jumping up on android

See original GitHub issue

💻 My environment

  • react-native-bootsplash version:2.2.4

  • react-native version: 0.60.5

  • Platform: android

  • OS version: ?

  • Device: all android device

  • Simulator: yes

  • Android Studio version: ?

  • Android buildToolsVersion: ?

  • Xcode version: ?

🕵️‍♂️ Reproducing the issue

When following the instructions, I get a good working result on iOS. On android, there is a small jump up (approx. the height of the status bar, so I suspect it has to do with that) a split second after opening the app. ezgif com-video-to-gif

styles.xml

<resources>
  <!-- Base application theme. -->
  <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowDisablePreview">true</item>
  </style>
  <!-- BootTheme should inherit from AppTheme -->
  <style name="BootTheme" parent="AppTheme">
    <item name="android:windowBackground">@drawable/splash_screen</item>
  </style>
</resources>

bootsplash.xml

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

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

    <item>
        <bitmap android:src="@mipmap/icon" android:gravity="fill" />
    </item>
</layer-list>

🤞Solution

<StatusBar backgroundColor=“rgba(0,0,0,.3)” translucent={true}-----> it should be true only when splash screen done hidden={false} barStyle=“light-content” />

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
zoontekcommented, Sep 10, 2020

Ah indeed! Or set your status bar as transparent at start in your styles.xml, it will solves it too.

0reactions
David-moonsitecommented, Sep 10, 2020

find the problem 👍

<StatusBar
            backgroundColor="rgba(0,0,0,.3)"
             **translucent={true}**-----> it should be true only when splash screen done
            hidden={false}
            barStyle="light-content"
          />
Read more comments on GitHub >

github_iconTop Results From Across the Web

Splash screen jumping up on android #385 - GitHub
When following the instructions, I get a good working result on iOS. On android, there is a small jump up (approx. the height...
Read more >
Android splash screen jump java - Stack Overflow
The problem is that splash screen jumps a little bit. Tried different options - fullscreen, no action bar for splash, no action bar...
Read more >
How to fix Galaxy android phone screen flickering or flashing
Start by uninstalling the most recent app you downloaded before the problem started. Repeat until the flickering stops. You can always reinstall an...
Read more >
Splash Screen shifts up then down on cold start : r/androiddev
So I created a splash screen for my app (according to this link). Everything works fine until the app cold starts or when...
Read more >
android splash flicker - Felgo
I want to have a splash screen that is active immediately. but i get a flicker during apptheme drawable splash and manifest splash....
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