Closed muhamedzeema closed 3 years ago
@muhamedzeema you will have to do some changes in native android.
@muhamedzeema you will have to do some changes in native android.
any assistance please ?
add color.xml in ..android/app/src/main/res/values and pate following code
<?xml version="1.0" encoding="utf-8"?>
copy and pate following code in ..android/app/src/main/res/values/styles.xml
Sorry for bad format or search for "react native status bar color change xml"
@girish54321 hello thanks for that, but already i had this implemented the issue is that the status bar is only Black on splash screen but the whole app have the color i set on colorPrimaryDark. my problem is that i can't change the black color from the splash screen, but the other app is fine. got me ?
@muhamedzeema Ya I got you now but look only @HwangTaehyun can help you with this.
@girish54321 thank you!, @HwangTaehyun any help with this please ?
Sorry for late. I check this issue. You should use this api public static void show(final Activity activity, final int themeResId, final int lottieId)
to set theme color. I paste the example code below. Thank you!
SplashScreen.show(this, R.style.SplashTheme, R.id.lottie);
@HwangTaehyun hi, how to configure the R.style.SplashTheme, and i got the follow error while building:
MainActivity.java:23: error: cannot find symbol SplashScreen.show(this, R.style.SplashTheme, R.id.lottie); // here
@muhamedzeema @Kladislav hi, I followed the guide in https://github.com/crazycodeboy/react-native-splash-screen
If you want to customize the color of the status bar when the splash screen is displayed: Create
android/app/src/main/res/values/colors.xml
and add<?xml version="1.0" encoding="utf-8"?> <resources> <color name="status_bar_color"><!-- Colour of your status bar here --></color> </resources>
Create a style definition for this in
android/app/src/main/res/values/styles.xml
:<?xml version="1.0" encoding="utf-8"?> <resources> <style name="SplashScreenTheme" parent="SplashScreen_SplashTheme"> <item name="colorPrimaryDark">@color/status_bar_color</item> </style> </resources>
Change your
show
method to include your custom style:SplashScreen.show(this, R.style.SplashScreenTheme);
My code is below. I applied red color status bar for example. You also can apply white or transparent status bar color. Thank you!
There's no problem with this issue anymore. I will close the issue.
how to change status bar in ios?
Changes Safeareaview color? maybe @ghazihussain
Run
react-native info
in your project and share the content.What
react-native-splash-screen
version are you using? "react-native-lottie-splash-screen": "^0.1.12", What platform does your issue occur on? (Android/iOS/Both) android Describe your issue as precisely as possible : 1) Steps to reproduce the issue or to explain in which case you get the issue 2) Interestinglogs
Join a screenshot or video of the problem on the simulator or device?
Show us the code you are using?
i tried this solution LINK but the app crashes when implementing this because i think you use SplashScreen.show(this, R.id.lottie); so any help with this please ? .