提交 c95b4dc9 authored 作者: jungleiOS's avatar jungleiOS

android 关闭自动旋转

上级 ae5fd616
......@@ -10,8 +10,8 @@
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
return UIInterfaceOrientationMaskAll;
}
//- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
//
// return UIInterfaceOrientationMaskAll;
//}
@end
......@@ -420,26 +420,14 @@ class GZVideoPlayerState extends State<GZVideoPlayer>
if (Platform.isIOS) {
GzOrientation.forceOrientation(DeviceOrientation.portraitUp);
} else {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]).then((_) {
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);
});
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
}
} else {
if (Platform.isIOS) {
GzOrientation.forceOrientation(DeviceOrientation.landscapeRight);
}
else {
SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]).then((_){
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);
});
SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]);
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论