锁定解除屏幕方向

296 阅读1分钟
plus.screen.lockOrientation( String orientation );

锁定屏幕方向可取以下值: "portrait-primary": 竖屏正方向; "portrait-secondary": 竖屏反方向,屏幕正方向按顺时针旋转180°; "landscape-primary": 横屏正方向,屏幕正方向按顺时针旋转90°; "landscape-secondary": 横屏方向,屏幕正方向按顺时针旋转270°; "portrait": 竖屏正方向或反方向,根据设备重力感应器自动调整; "landscape": 横屏正方向或反方向,根据设备重力感应器自动调整;


plus.screen.unlockOrientation();
解除锁定屏幕方向后将恢复应用默认的屏幕显示方向(通常为应用打包发布时设置的方向)