「MonoGame (Xamarin.Android)で画面の向きを指定する」の版間の差分

編集の要約なし
編集の要約なし
 
9行目: 9行目:
* 縦画面に固定したい場合は「ScreenOrientation.Portrait」を指定する。
* 縦画面に固定したい場合は「ScreenOrientation.Portrait」を指定する。


<source>
<source lang="csharp">
    [Activity(Label = "Game1",
[Activity(Label = "Game1",
              MainLauncher = true,
            MainLauncher = true,
              Icon = "@drawable/icon",
            Icon = "@drawable/icon",
              Theme = "@style/Theme.Splash",
            Theme = "@style/Theme.Splash",
              AlwaysRetainTaskState = true,
            AlwaysRetainTaskState = true,
              LaunchMode = LaunchMode.SingleInstance,
            LaunchMode = LaunchMode.SingleInstance,
              ScreenOrientation = ScreenOrientation.Portrait,
            ScreenOrientation = ScreenOrientation.Portrait,
              ConfigurationChanges = ConfigChanges.Orientation |
            ConfigurationChanges = ConfigChanges.Orientation |
                                      ConfigChanges.KeyboardHidden |
                                    ConfigChanges.KeyboardHidden |
                                      ConfigChanges.Keyboard |
                                    ConfigChanges.Keyboard |
                                      ConfigChanges.ScreenSize)]
                                    ConfigChanges.ScreenSize)]
    public class GameActivity : AndroidGameActivity
public class GameActivity : AndroidGameActivity
    {
{
    }
}
</source>
</source>