android屏幕切换黑屏,android旋转屏幕 半边黑屏
LayaAir Native SDK 0.9.7 旋转后黑屏老版本LayaAir Native SDK 0.9.2正常//初始化引擎Laya.init(Browser.width, Browser.height, WebGL);Laya.stage.bgColor = "#ffeff0";//设置横竖屏//Laya.stage.optimizeScrollRect = true;Fon...
LayaAir Native SDK 0.9.7 旋转后黑屏 老版本LayaAir Native SDK 0.9.2 正常//初始化引擎
Laya.init(Browser.width, Browser.height, WebGL);
Laya.stage.bgColor = "#ffeff0";
//设置横竖屏
//Laya.stage.optimizeScrollRect = true;
Font.defaultFont = "宋体";
Laya.stage.alignV = "top";
Laya.stage.alignH = "left";
Laya.stage.screenMode = "vertical";
Laya.stage.scaleMode = Stage.SCALE_FULL;
spr = new Sprite
var te:Text = new Text();
te.fontSize = 50;
te.text = "内容测试";
spr.addChild(te);
Laya.stage.addChild(spr);
Laya.stage.on(Event.CLICK, this, function():void {
if (Laya.stage.screenMode == Stage.SCREEN_HORIZONTAL) {
if (Browser.window.conchConfig) {
Browser.window.conchConfig.setScreenOrientation(1);
}
Laya.stage.screenMode = Stage.SCREEN_VERTICAL;
Laya.stage.scaleMode = Stage.SCALE_FULL;
} else {
if (Laya.stage.screenMode == Stage.SCREEN_VERTICAL) {
if (Browser.window.conchConfig)
Browser.window.conchConfig.setScreenOrientation(0);
}
Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL;
Laya.stage.scaleMode = Stage.SCALE_FULL;
}
}
});
更多推荐
所有评论(0)