Pro*_*mma 13 android orientation device-orientation react-native
我正在使用React Native 0.29并为Android开发.我正试图锁定设备方向.我需要的是以纵向模式锁定屏幕.我尝试使用此存储库https://github.com/yamill/react-native-orientation但它尚未支持RN 0.29.
有什么方法可以锁定设备方向吗?也许任何原生的Android黑客与Android工作室?
有一个拉取请求可以在 0.29.2 及更高版本上工作: https://github.com/yamill/react-native-orientation/pull/85
如果你使用他的版本,它应该可以在 0.29.2 及更高版本上工作: https: //github.com/youennPennarun/react-native-orientation
脚步:
取消先前安装的链接rnpm unlink react-native-orientation
rm -rf node_modules/react-native-orientation
在 package.json 中将 的条目编辑react-native-orientation为:
"react-native-orientation": "youennPennarun/react-native-orientation"
npm install
react-native link react-native-orientation
此后事情应该会起作用。您可以跟踪 PR 的进度并在合并后切换到主存储库。
| 归档时间: |
|
| 查看次数: |
8607 次 |
| 最近记录: |