using System; using Android.App; using Android.Content; using Android.Runtime; using Android.Views; using Android.Widget; using Android.OS; using Microsoft.Xna.Framework; using Android.Content.PM; namespace CatapultGame.Android { [Activity( Label = "@string/app_name", MainLauncher = true, Icon = "@drawable/icon", AlwaysRetainTaskState = true, LaunchMode = LaunchMode.SingleInstance, ScreenOrientation = ScreenOrientation.SensorLandscape, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden )] public class MainActivity : AndroidGameActivity { private CatapultGame _game; private View _view; protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); _game = new CatapultGame(); _view = _game.Services.GetService(typeof(View)) as View; SetContentView(_view); _game.Run(); } } }