Skip to content

Commit

Permalink
docs: add description for display cutout
Browse files Browse the repository at this point in the history
  • Loading branch information
kadiraydinli committed Apr 23, 2023
1 parent 6367c11 commit 423156e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,25 @@ import SystemNavigationBar from 'react-native-system-navigation-bar';
SystemNavigationBar.fullScreen(true);
```

**Note:** For notched devices, add the code below to `/android/app/src/main/res/values/styles.xml` in your project to include the cutout for the notch.

```xml
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
```

After adding the code, the estimated content of the `styles.yml` file will be as follows.

```xml
<resources>
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
</resources>
```

Check out the [documentation](https://developer.android.com/develop/ui/views/layout/display-cutout) for more information about this code.

#### `lowProfile()`

The icons in the system and navigation bar are visually retracted. You can browse the [documentation](https://developer.android.com/training/system-ui/dim "documentation") for more information.
Expand Down

0 comments on commit 423156e

Please sign in to comment.