gpt4 book ai didi

cordova - Sencha-touch如何锁定方向?

转载 作者:行者123 更新时间:2023-12-01 12:46:29 25 4
gpt4 key购买 nike

我的环境使用的是Sencha-touch & PhoneGap。我可以用 Vertical 锁定方向吗?我不希望用户使用水平方向进行操作。

launch: function() {
// Destroy the #appLoadingIndicator element
Ext.fly('appLoadingIndicator').destroy();

// Initialize the main view
Ext.Viewport.add(Ext.create('ebook.view.Main'));
},

我需要在午餐功能上添加一些控制或配置吗?或者我需要将控件添加到 main.js。我的目的是我想将方向锁定在“垂直方向”。有没有人可以帮助我。谢谢你。

其他引用资料:我在“package.json”上找到了下面的代码,我尝试删除“landscapeLeft”和“landscapeRight”并重建它得到了相同的结果。我无法锁定用户方向。

    /**
* @cfg {Array[String]} orientations
* @required
* This is orientations that this application can run.
*/
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]

最佳答案

你应该在 PhoneGap 的 config.xml 中这样做

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

关于cordova - Sencha-touch如何锁定方向?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15355752/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com