1.5.2 • Published 1 year ago

@yunzhoukit/react-native-orientation-locker v1.5.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@yunzhoukit/react-native-orientation-locker

Installation

Using yarn (RN 0.60 and and above)

    yarn add @yunzhoukit/react-native-orientation-locker

Using yarn (RN 0.59 and and below)

    yarn add @yunzhoukit/react-native-orientation-locker
    react-native link @yunzhoukit/react-native-orientation-locker

Manual linking

For Windows, if you are using RNW v0.63.0 or higher, autolinking should link the module for you. Otherwise, you must follow the steps outlined here for linking module.

Add following to MainApplication.java (This will be added automatically by auto link. If not, please manually add the following )

//...
+import org.wonday.orientation.OrientationPackage;
    @Override
    protected List<ReactPackage> getPackages() {
      @SuppressWarnings("UnnecessaryLocalVariable")
      List<ReactPackage> packages = new PackageList(this).getPackages();
      // Packages that cannot be autolinked yet can be added manually here, for example:
      // packages.add(new MyReactNativePackage());
+      packages.add(new OrientationPackage());
      return packages;
    }
//...
1.5.2

1 year ago

0.0.1

1 year ago