如何设置黑莓手机的方向?

时间:2013-02-27 13:00:07

标签: blackberry cordova blackberry-webworks

我正在开发BlackBerry Phonegap应用程序,我想将应用程序的方向设置为纵向。为此,我在config.xml文件中添加<preference name="orientation" value="portrait" />,但它无法正常工作。

我正在使用Phonegap版本2.4.0。任何人都可以帮我设定方向吗?

2 个答案:

答案 0 :(得分:1)

您需要在config.xml文件中锁定这样的方向

<feature id="blackberry.app">
    <param name="orientation" value="portrait" />
</feature>

config.xml的文档可在此处获取 - http://developer.blackberry.com/html5/documentation/param_element.html

答案 1 :(得分:1)

来自BlackBerry Support Forums

<rim:orientation mode="portrait" />
在config.xml中

Requires WebWorks SDK 2.3 or later

相关问题