ℹ️ INFO : All Bug's for React Native 0.69 + has fixed , If any errors or updates please open a new issue OPEN ISSUE
Install
yarn add react-native-fullscreen-chz
OR
npm install react-native-fullscreen-chz --save
Usage
Important steps
Goto android / app / res / values / styles.xml
- <resources>+ <resources xmlns:tools="http://schemas.android.com/tools">
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:textColor">#000000</item>
<!-- Add this line for notched devices. -->
+ <item name="android:windowLayoutInDisplayCutoutMode" tools:ignore="NewApi">shortEdges</item>
</style>
</resources>
importFullScreenChzfrom'react-native-fullscreen-chz';FullScreenChz.enable()FullScreenChz.disable()// To disable
Full Example
<resourcesxmlns:tools="http://schemas.android.com/tools">
<stylename="AppTheme"parent="Theme.AppCompat.DayNight.NoActionBar">
<itemname="android:textColor">#000000</item>
<!-- Add this line for notched devices. -->
<itemname="android:windowLayoutInDisplayCutoutMode"tools:ignore="NewApi">shortEdges</item>
</style>
</resources>
importReactfrom'react';import{Button,View}from'react-native';importFullScreenChzfrom'react-native-fullscreen-chz';constApp=()=>{return(<Viewstyle={{justifyContent: 'center',flex: 1}}><Buttontitle="Foo"onPress={()=>{FullScreenChz.enable();//FullScreenChz.disable(); to Disable full screen view}}/></View>);};exportdefaultApp;