Skip to content

HanTingYe/react-native-display-cutout

 
 

Repository files navigation

DisplayCutout for React Native

GitHub version Maintainability Codacy Badge

Getting started

$ npm install react-native-display-cutout --save

or

$ yarn add react-native-display-cutout

Mostly automatic installation

$ react-native link react-native-display-cutout

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.rajivshah.displaycutout.RNDisplayCutoutPackage; to the imports at the top of the file
  • Add new RNDisplayCutoutPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-display-cutout'
    project(':react-native-display-cutout').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-display-cutout/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-display-cutout')
    

Usage

See the full documentation here

import RNDisplayCutout from 'react-native-display-cutout';

// TODO: What to do with the module?

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 77.5%
  • JavaScript 22.5%