1234567891011121314151617181920212223242526272829 |
- using Android.App;
- using Android.OS;
- using Android.Content.PM;
- namespace Draw2D
- {
- [Activity(
- Label = "@string/app_name",
- MainLauncher = true,
- AlwaysRetainTaskState = true,
- LaunchMode = LaunchMode.SingleInstance,
- ScreenOrientation = ScreenOrientation.SensorLandscape,
- ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize
- )]
- public class Activity1 : AndroidGameActivity
- {
- private Game1 _game;
- protected override void OnCreate(Bundle bundle)
- {
- base.OnCreate(bundle);
- _game = new Game1();
- SetContentView((View)_game.Services.GetService(typeof(View)));
- _game.Run();
- }
- }
- }
|