[英]How to set orientation to portrait mode, regardless the auto-rotate in Android / React Native
I want to set portrait mode
in my react native android application, I tried to我想在我的本机 android 应用程序中设置portrait mode
,我试图
android:screenOrientation="portrait"
in my Android Manifest.xml
file,在我的 Android Manifest.xml
文件中设置android:screenOrientation="portrait"
,setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
在我的活动中以编程方式添加方向作为setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
but none of these is working.但这些都不起作用。 Note: I have added react-native-navigation
in my project注意:我在我的项目中添加了react-native-navigation
Any inputs to resolve this?任何输入来解决这个问题? Thanks.谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.