cordova实现点击按钮旋转屏幕插件cordova-plugin-screen-orientation

一、关于cordova-plugin-screen-orientation插件:

Cordova插件以iOS,Android和windows-uwp的常用方式设置/锁定屏幕方向。此插件基于Screen Orientation API,因此api与当前规范匹配。

该插件将以下内容添加到屏幕对象(window.screen):

// lock the device orientation
.orientation.lock('portrait')

// unlock the orientation
.orientation.unlock()

// current orientation
.orientation

二、使用方法:

1.安装插件:

cordova plugin add cordova-plugin-screen-orientation

Git 源代码地址:https://github.com/apache/cordova-plugin-screen-orientation

2.指定Orientations 设置宣传角度:

你可能感兴趣的:(Apache,Cordova)