Skip to content

Commit 6ec7543

Browse files
committed
Add status bar config details
1 parent 1088637 commit 6ec7543

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

resources/views/docs/mobile/1/the-basics/web-view.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ And it may be even worse in landscape view:
8585

8686
![](/img/docs/viewport-default-landscape.png)
8787

88-
But by adding a few simple adjustments to our page, we can make it beautiful again:
88+
But by adding a few simple adjustments to our page, we can make it beautiful again (Well, maybe we should lose the
89+
red...):
8990

9091
```html
9192
<body class="nativephp-safe-area">
@@ -96,7 +97,36 @@ But by adding a few simple adjustments to our page, we can make it beautiful aga
9697

9798
![](/img/docs/viewport-fit-cover-landscape.png)
9899

99-
(Well, maybe we should lose the red...)
100+
### Status Bar Style
100101

101-
With just a few simple adjustments, we've been able to define a layout that will work well on a multitude of devices
102+
On Android, the icons in the Status Bar do not change color automatically based on the background color in your app.
103+
By default, they change based on whether the device is in Light/Dark Mode.
104+
105+
If you have a consistent background color in both light and dark mode, you may use the `nativephp.status_bar_style`
106+
config key to set the appropriate status bar style for your app to give users the best experience.
107+
108+
The possible options are:
109+
110+
- `auto` - the default, which changes based on the device's Dark Mode setting
111+
- `light` - ideal if your app's background is dark-colored
112+
- `dark` - better if your app's background is light-colored
113+
114+
<aside class="relative z-0 mt-5 overflow-hidden rounded-2xl bg-pink-50 px-5 ring-1 ring-black/5 dark:bg-pink-600/10">
115+
116+
#### Missing Config Keys?
117+
118+
If your `config/nativephp.php` file is missing newer config keys, you can simply add them in! Reference them from the
119+
default version of this config file in `vendor/nativephp/mobile/config/nativephp.php`.
120+
121+
Alternatively, you can force-publish the config file by running:
122+
123+
```shell
124+
php artisan vendor:publish --tag=nativephp-mobile-config --force
125+
```
126+
127+
But note that this will overwrite any changes you've made to your copy of this config file.
128+
129+
</aside>
130+
131+
With just a few small changes, we've been able to define a layout that will work well on a multitude of devices
102132
without having to add complex calculations or lots of device-specific CSS rules to our code.

0 commit comments

Comments
 (0)