React-native-splash-screen: misalignment with windowBackground

Created on 11 Oct 2017  路  6Comments  路  Source: crazycodeboy/react-native-splash-screen

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?

Most helpful comment

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

All 6 comments

I want to fix this too !

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

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.

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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leishi8819 picture leishi8819  路  3Comments

jassonha21 picture jassonha21  路  3Comments

TsuryKnox picture TsuryKnox  路  5Comments

zxyah picture zxyah  路  4Comments

ijry picture ijry  路  5Comments