您的位置:首页 > 移动开发 > Android开发

Mono For Android 如何控制程序在自动旋转功能开启下不进行横竖屏切换

2015-01-19 15:24 429 查看
解决方案如下:

通过为Activity类打上Attibute标记来实现,所以我们只要在我们的Activity1类的Attribute里加上ScreenOrientation属性即可。

例如:

程序竖屏显示

[Activity(Label = "XX", MainLauncher = false, Icon = "@drawable/Icon", Theme = "@android:style/Theme.Black.NoTitleBar",
ScreenOrientation = Android.Content.PM.ScreenOrientation.Portrait)]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: