How to restrict app to portrait mode only in ionic for all platforms?

后端 未结 9 691
暖寄归人
暖寄归人 2020-12-23 08:37

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:sc         


        
9条回答
  •  悲哀的现实
    2020-12-23 09:10

    If you want to do something on your orientation means you want to perform any action when change your app orientation then you have to use ionic framework plugin... https://ionicframework.com/docs/native/screen-orientation/

    If you just want to restrict your app on portrait or landscape mode then you have to just add these following line in your config.xml

    
                     OR
    
    

提交回复
热议问题