2019-09-01 11:56:12 +02:00
|
|
|
using Android.App;
|
|
|
|
using Android.Content.PM;
|
|
|
|
using Android.OS;
|
|
|
|
using Android.Views;
|
|
|
|
using Demos;
|
|
|
|
|
|
|
|
namespace AndroidDemos {
|
|
|
|
[Activity(Label = "Demos.Android"
|
|
|
|
, MainLauncher = true
|
|
|
|
, Icon = "@drawable/icon"
|
|
|
|
, Theme = "@style/Theme.Splash"
|
|
|
|
, AlwaysRetainTaskState = true
|
|
|
|
, LaunchMode = LaunchMode.SingleInstance
|
|
|
|
, ScreenOrientation = ScreenOrientation.SensorLandscape
|
|
|
|
, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize)]
|
|
|
|
public class Activity1 : Microsoft.Xna.Framework.AndroidGameActivity {
|
|
|
|
|
|
|
|
protected override void OnCreate(Bundle bundle) {
|
|
|
|
base.OnCreate(bundle);
|
|
|
|
var g = new GameImpl();
|
2019-09-05 14:27:18 +02:00
|
|
|
// disable mouse handling for android to make emulator behavior more coherent
|
|
|
|
g.OnLoadContent += game => game.InputHandler.HandleMouse = false;
|
2019-09-01 11:56:12 +02:00
|
|
|
this.SetContentView((View) g.Services.GetService(typeof(View)));
|
|
|
|
g.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|