I want to set portrait mode
in my react native android application, I tried to
android:screenOrientation="portrait"
in my Android Manifest.xml
file,setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
but none of these is working. Note: I have added react-native-navigation
in my project
Any inputs to resolve this? Thanks.
if you're using react-native-navigation, try this
Navigation.setDefaultOptions({
layout: {
orientation: ["portrait"],
},
});
Check the docs here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.