React-native-splash-screen statusbar color (incompatible types)
Asked Answered
Z

3

9

I'm trying to implement, react-native-splash-screen on my Android APP.

Splash screen works great, but when I try to customize my status bar color (see docs), I have this error:

"incompatible types: int cannot be converted to boolean"

enter image description here

I follow the instructions step by step (docs). My code is exacly the same

If I remove R.style.SplashScreenTheme, all works fine.

PD: Theme name on styles.xml and R.style.THEMENAME is the same

Zurn answered 15/12, 2021 at 20:15 Comment(0)
I
1

Had the same issue a while ago. the package is not being maintained. So probably can't change the status bar color. maybe try react-native-bootsplash. It's a well maintained package and doesnot have any issues like this.

Inconsequent answered 17/12, 2021 at 9:42 Comment(1)
Yes, I finally decide to move to react-native-bootsplash, thanks!Zurn
A
38

add a third parameter to show function

SplashScreen.show(this, R.style.SplashScreenTheme, true);  // false to disable fullscreen
Antiseptic answered 11/1, 2022 at 14:48 Comment(1)
It worked for me. Thanks!Angelineangelique
I
1

Had the same issue a while ago. the package is not being maintained. So probably can't change the status bar color. maybe try react-native-bootsplash. It's a well maintained package and doesnot have any issues like this.

Inconsequent answered 17/12, 2021 at 9:42 Comment(1)
Yes, I finally decide to move to react-native-bootsplash, thanks!Zurn
N
0

just downgrade to ^3.2.0 and it will work fine

Nucleoplasm answered 25/12, 2021 at 12:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.