[Activity(Label = "Game1"
, MainLauncher = true
, Icon = "@drawable/icon"
, Theme = "@style/Theme.Splash"
, AlwaysRetainTaskState = true
, LaunchMode = Android.Content.PM.LaunchMode.SingleInstance
, ScreenOrientation = ScreenOrientation.FullUser
, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize)]
横画面に固定したい場合は「ScreenOrientation.Landscape」、縦画面に固定したい場合は「ScreenOrientation.Portrait」に設定しましょう。
Xamarin.Android+MonoGameメモシリーズ。Androidの画面向きの指定方法です。
[スポンサードリンク]
「Activity1.cs」の「ScreenOrientation」の値を変更します。
デフォルトは「ScreenOrientation.FullUser」となっていて、端末の「自動回転」が有効なら、画面を横にすると横画面に代わります。
[スポンサードリンク]
コメント
[スポンサードリンク]
関連記事
[スポンサードリンク]