react-native-splash-screen icon indicating copy to clipboard operation
react-native-splash-screen copied to clipboard

react-native-splash-screen always show it does not hide automatically

Open partha-blacknight opened this issue 4 years ago • 12 comments

I am using react-native-splash-screen version 3.2 . It show successfully but does not hide always show and don't load react native component screen. But I follow all the steps that declare to the plugin manual. I observe it in android platform. Please give me the solution then it's a pleasure for me.

partha-blacknight avatar Oct 01 '19 09:10 partha-blacknight

Hello, Maybe you could double check with this tutorial : https://medium.com/@appstud/add-a-splash-screen-to-a-react-native-app-810492e773f9

rphlmr avatar Oct 01 '19 23:10 rphlmr

Hello quick way to add a spash screen for android is save your splash screen png(my image is full screen height) to android/app/src/main/res/drawable/splash_screen.png then edit android/app/src/main/res/values/styles.xml `

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="android:windowBackground">@drawable/splash_screen</item>
</style>
`

vinstah avatar Oct 02 '19 02:10 vinstah

take a look at https://github.com/crazycodeboy/react-native-splash-screen/issues/442#issuecomment-553391344, the SplashScreen.hide() in App.js componentDidMount did the trick

jeromediaz avatar Dec 30 '19 11:12 jeromediaz

Import SplashScreen from './react-native-splash-screen' in App.js, then use SplashScreen.hide() within componentDidMount()

anupsamanta avatar Jan 31 '20 19:01 anupsamanta

I use wix/react-native-navigation and I used SplashScreen.hide() inside componentDidMount() but the splash screen always shows up...Then I moved it inside index.js after screen registering but it did not work as well. Please help me.

tsiory avatar May 10 '20 03:05 tsiory

Even the bundler does not start. Just a still Screen

arpitBhalla avatar Jul 16 '20 09:07 arpitBhalla

try to remove the app and run it again from xcode

safoueneba avatar Aug 19 '20 11:08 safoueneba

plz check android/app/src/main/java/<your android package path>/MainActivity.java after call react-native set-splash ..., maybe code are changed like below.

public class MainActivity extends ReactActivity {
    ReactContext reactContext;
    PopupWindow popupWindow;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
SplashScreen.show(this, R.style.SplashScreenTheme);        SplashScreen.show(this);
        super.onCreate(savedInstanceState);
SplashScreen.show(this, R.style.SplashScreenTheme);        this.setVolumeControlStream(AudioManager.STREAM_MUSIC);
        // ...

remove SplashScreen.show(this, R.style.SplashScreenTheme); like below

public class MainActivity extends ReactActivity {
    ReactContext reactContext;
    PopupWindow popupWindow;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        SplashScreen.show(this);
        super.onCreate(savedInstanceState);
        this.setVolumeControlStream(AudioManager.STREAM_MUSIC);
        // ...

i think maybe SplashScreen.show(this, R.style.SplashScreenTheme); cause that issue.

Einere avatar Mar 24 '21 09:03 Einere

I use wix/react-native-navigation and I used SplashScreen.hide() inside componentDidMount() but the splash screen always shows up...Then I moved it inside index.js after screen registering but it did not work as well. Please help me.

yeah , me too !!! I don't know if you have the answer to this, I'm having the same problem :(

toanutcer avatar May 28 '21 07:05 toanutcer

Any Solution for that issue, i face the same problem

MursiDirect avatar Oct 21 '21 09:10 MursiDirect

I've found a solution, in MainActivity.java file, Instead of SplashScreen.show(this, R.style.SplashScreenTheme); or SplashScreen.show(this); Try this SplashScreen.show(this, true); worked like a charm, for me

MursiDirect avatar Oct 21 '21 16:10 MursiDirect

any solution ?

dibyopra avatar Sep 12 '22 09:09 dibyopra