How to fix screen orientation to portrait for my whole PhoneGap app

后端 未结 4 783
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-05 09:04

How to configure the Phonegap app to be fixed to only portrait mode, I there any possibility to do it with CSS or JavaScript so that I should be able to get the consistent behav

4条回答
  •  轮回少年
    2021-02-05 09:33

    Actually you can use config.xml to set it to all devices if you're using PhoneGap Build...
    Set the propertie: orientation with possible values default, landscape, or portrait
    example:

    < preference name="orientation" value="landscape" />

    *please note that default means both landscape and portrait are enabled.

    Source:
    https://build.phonegap.com/docs/config-xml

提交回复
热议问题