尝试在Android,iOS,Windows上将屏幕锁定为肖像。
我尝试使用cordova-plugin-screen-orientation但我的代码不起作用。
document.addEventListener("intel.xdk.device.ready", onDeviceReady, false);
function onDeviceReady() {
intel.xdk.device.setRotateOrientation('portrait');
}
答案 0 :(得分:1)
进入构建设置并查找" Orientation"。单击旁边的白色框,然后单击" Portrait"。在所有平台上重复#39;构建设置,无需代码。
我希望这有帮助!