Skip to content

Commit d37333e

Browse files
committed
Remove non edge-to-edge themes
1 parent d71eded commit d37333e

File tree

16 files changed

+54
-135
lines changed

16 files changed

+54
-135
lines changed

README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ _📌 The available plugins options are:_
182182
type PluginOptions = {
183183
assetsDir?: string; // optional, default is "assets/bootsplash"
184184
android?: {
185-
parentTheme?: "TransparentStatus" | "EdgeToEdge"; // optional, default is `undefined` (`Theme.BootSplash`)
186185
darkContentBarsStyle?: boolean; // optional, default is `undefined`
187186
};
188187
};
@@ -413,24 +412,18 @@ const App = () => {
413412

414413
## FAQ
415414

416-
### How can I have a transparent status bar, or [edge-to-edge layout](https://developer.android.com/develop/ui/views/layout/edge-to-edge)?
415+
### How can I enforce the splash screen system bar colors?
417416

418-
Edit your `values/styles.xml` file to inherit from `Theme.BootSplash.TransparentStatus` / `Theme.BootSplash.EdgeToEdge` instead of `Theme.BootSplash`:
417+
By default, the system bars `dark-content` in light mode and `light-content` in dark mode. To enforce a specific value, edit your `values/styles.xml` file:
419418

420419
```xml
421420
<resources>
422-
423421
<!---->
424422

425-
<!-- make BootTheme inherit from Theme.BootSplash.TransparentStatus / Theme.BootSplash.EdgeToEdge -->
426-
<style name="BootTheme" parent="Theme.BootSplash.EdgeToEdge">
427-
<!---->
428-
429-
<!-- optional, used to enforce the initial bars styles -->
430-
<!-- default is true in light mode, false in dark mode -->
423+
<style name="BootTheme" parent="Theme.BootSplash">
431424
<item name="darkContentBarsStyle">true</item>
425+
<!---->
432426
</style>
433-
434427
</resources>
435428
```
436429

android/src/main/res/drawable-v23/compat_splash_screen.xml

Lines changed: 0 additions & 19 deletions
This file was deleted.

android/src/main/res/drawable-v23/compat_splash_screen_oneui_4.xml

Lines changed: 0 additions & 21 deletions
This file was deleted.

android/src/main/res/drawable/compat_splash_screen.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
<color android:color="?attr/bootSplashBackground" />
55
</item>
66

7-
<item android:gravity="fill">
8-
<bitmap android:src="?bootSplashLogo" android:gravity="center" />
9-
</item>
7+
<item
8+
android:drawable="?bootSplashLogo"
9+
android:gravity="center"
10+
android:width="288dp"
11+
android:height="288dp" />
1012

11-
<item android:gravity="fill" android:bottom="60dp">
12-
<bitmap android:src="?bootSplashBrand" android:gravity="bottom|center_horizontal" />
13-
</item>
13+
<item
14+
android:drawable="?bootSplashBrand"
15+
android:gravity="bottom|center_horizontal"
16+
android:width="200dp"
17+
android:height="80dp"
18+
android:bottom="60dp" />
1419
</layer-list>

android/src/main/res/drawable/compat_splash_screen_oneui_4.xml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@
44
<color android:color="?attr/bootSplashBackground" />
55
</item>
66

7-
<item android:gravity="fill">
8-
<bitmap android:src="?bootSplashLogo" android:gravity="center" />
9-
</item>
7+
<!-- There's an issue with logo size on Samsung OneUI v4
8+
We need to render it 2 times smaller (288 / 2 = 144) -->
9+
<item
10+
android:drawable="?bootSplashLogo"
11+
android:gravity="center"
12+
android:width="144dp"
13+
android:height="144dp" />
1014

11-
<item android:gravity="fill" android:bottom="60dp">
12-
<bitmap android:src="?bootSplashBrand" android:gravity="bottom|center_horizontal" />
13-
</item>
15+
<item
16+
android:drawable="?bootSplashBrand"
17+
android:gravity="bottom|center_horizontal"
18+
android:width="200dp"
19+
android:height="80dp"
20+
android:bottom="60dp" />
1421
</layer-list>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<style name="Theme.BootSplash.Base" parent="Theme.BootSplash.DayNight">
3+
<style name="Theme.BootSplash.Attr" parent="Theme.AppCompat.DayNight.NoActionBar">
44
<item name="darkContentBarsStyle">false</item>
55
</style>
66
</resources>

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

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="navigationBarColor">@android:color/transparent</color>
4+
</resources>
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<style name="Theme.BootSplash.EdgeToEdge" parent="Theme.BootSplash.EdgeToEdge.Common">
3+
<style name="Theme.BootSplash.v27" parent="Theme.BootSplash.Base">
44
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
5-
6-
<item name="android:statusBarColor">@android:color/transparent</item>
7-
<item name="android:windowLightStatusBar">?darkContentBarsStyle</item>
8-
9-
<item name="android:navigationBarColor">@android:color/transparent</item>
105
<item name="android:windowLightNavigationBar">?darkContentBarsStyle</item>
116
</style>
127
</resources>
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<style name="Theme.BootSplash.DayNight" parent="Theme.AppCompat.DayNight.NoActionBar">
3+
<style name="Theme.BootSplash.v29" parent="Theme.BootSplash.v27">
44
<item name="android:forceDarkAllowed">false</item>
5-
</style>
6-
7-
<style name="Theme.BootSplash.EdgeToEdge" parent="Theme.BootSplash.EdgeToEdge.Common">
8-
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
9-
105
<item name="android:enforceStatusBarContrast">false</item>
11-
<item name="android:statusBarColor">@android:color/transparent</item>
12-
<item name="android:windowLightStatusBar">?darkContentBarsStyle</item>
13-
146
<item name="android:enforceNavigationBarContrast">false</item>
15-
<item name="android:navigationBarColor">@android:color/transparent</item>
16-
<item name="android:windowLightNavigationBar">?darkContentBarsStyle</item>
177
</style>
188
</resources>

0 commit comments

Comments
 (0)