Skip to content

Commit 77f8f3d

Browse files
authored
Merge pull request #102 from hoboman313/master
Customize the status bar color via @color/primary_dark
2 parents 4ba298a + b28894a commit 77f8f3d

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,16 @@ Open `android/app/src/main/res/values/styles.xml` and add `<item name="android:w
201201
**To learn more see [examples](https://github.com/crazycodeboy/react-native-splash-screen/tree/master/examples)**
202202

203203

204+
If you want to customize the color of the status bar when the splash screen is displayed:
205+
206+
Create `android/app/src/main/res/values/colors.xml` and add
207+
```xml
208+
<?xml version="1.0" encoding="utf-8"?>
209+
<resources>
210+
<color name="primary_dark"><!-- Colour of your status bar here --></color>
211+
</resources>
212+
```
213+
204214
### iOS
205215

206216
Customize your splash screen via LaunchImage or LaunchScreen.xib,

android/src/main/res/values/refs.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
<item type="layout" name="launch_screen">
44
@layout/launch_screen
55
</item>
6+
<item type="color" name="primary_dark">
7+
@color/primary_dark
8+
</item>
69
</resources>

android/src/main/res/values/styles.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
<style name="SplashScreen_SplashTheme" parent="Theme.AppCompat.NoActionBar">
77
<item name="android:windowAnimationStyle">@style/SplashScreen_SplashAnimation</item>
8+
<item name="colorPrimaryDark">@color/primary_dark</item>
89
</style>
910
<style name="SplashScreen_Fullscreen" parent="SplashScreen_SplashTheme">
1011
<item name="android:windowFullscreen">true</item>

0 commit comments

Comments
 (0)