crazycodeboy / react-native-splash-screen

A splash screen for react-native, hide when application loaded ,it works on iOS and Android.
MIT License
5.61k stars 1.09k forks source link

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

Open partha-blacknight opened 5 years ago

partha-blacknight commented 5 years ago

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.

rphlmr commented 5 years ago

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

vinstah commented 5 years ago

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>

`

jeromediaz commented 4 years ago

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

anupsamanta commented 4 years ago

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

tsiory commented 4 years ago

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.

arpitBhalla commented 4 years ago

Even the bundler does not start. Just a still Screen

safoueneba commented 4 years ago

try to remove the app and run it again from xcode

Einere commented 3 years ago

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.

toanutcer commented 3 years ago

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 :(

MursiDirect commented 3 years ago

Any Solution for that issue, i face the same problem

MursiDirect commented 3 years ago

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

dibyopra commented 2 years ago

any solution ?