Issue
I'm working on Ionic/Cordova, I added this to androidManifest.xml
but this didn't work for me and app is still showing in both ways
android:screenOrientation="portrait"
How can I restrict my app to portrait mode only? I have checked on android and it doesn't work
Solution
If you want to restrict to portrait mode only on all devices you should add this line to the config.xml in your projects root folder.
<preference name="orientation" value="portrait" />
After that, please rebuild the platform by typing below text in command line:
ionic build
Answered By - Vadiem Janssens
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.