Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Landscape Orientation - MainApplication.java
//...
+import org.wonday.orientation.OrientationPackage;
+import org.wonday.orientation.OrientationActivityLifecycle;
@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;
}
//...
@Override
public void onCreate() {
...
+ registerActivityLifecycleCallbacks(OrientationActivityLifecycle.getInstance());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment