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

misalignment with windowBackground #108

Open evollu opened 7 years ago

evollu commented 7 years ago

I set my app's splash screen in my main style.xml as <item name="android:windowBackground">@drawable/splash</item>

and I use the same splash screen in react-native-splash-screen.

What I find when dialog splash screen's center is 20px higher than main activity's splash. I fixed by following rn-splash-screen's approach and changed style to be

<style name="SplashScreen_SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowBackground">@drawable/splash</item>
    </style>

and remove the code

mSplashDialog.setContentView(R.layout.launch_screen);

Is this a correct fix?

ppopth commented 7 years ago

I want to fix this too !

evollu commented 7 years ago

my forked repo has the changes if anyone wants to use it https://github.com/evollu/react-native-splash-screen

tonygentilcore commented 6 years ago

FWIW, I switched over to your evollu/react-native-splash-screen repo to pick up this fix. It works great! Really hope it can be upstreamed so that I can switch back to the canonical repo.

vonovak commented 6 years ago

@evollu are you planning to make a PR with the fix?

evollu commented 6 years ago

it is going to be breaking change. @crazycodeboy shall I make a PR?

FadiAboMsalam commented 5 years ago

@evollu am facing same issue here ! can you guide me on how to fix ?