Program.cs 856 B

1234567891011121314151617181920
  1. using Android.App;
  2. using Android.Content.PM;
  3. using Android.OS;
  4. using Android.Views;
  5. using Microsoft.Xna.Framework;
  6. namespace BackgroundThreadTester
  7. {
  8. [Activity(Label = "BackgroundThreadTester", MainLauncher = true, Icon = "@drawable/icon", Theme = "@style/Theme.Splash", AlwaysRetainTaskState = true, LaunchMode = LaunchMode.SingleInstance, ScreenOrientation = ScreenOrientation.FullUser, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize | ConfigChanges.ScreenLayout)]
  9. public class Activity1 : AndroidGameActivity
  10. {
  11. protected override void OnCreate(Bundle bundle)
  12. {
  13. base.OnCreate(bundle);
  14. var g = new Game1();
  15. SetContentView((View)g.Services.GetService(typeof(View)));
  16. g.Run();
  17. }
  18. }
  19. }