MainActivity.cs 780 B

12345678910111213141516171819
  1. using Android.App;
  2. using Android.Content.PM;
  3. using Android.OS;
  4. using Microsoft.Xna.Framework;
  5. namespace NetworkStateManagement
  6. {
  7. [Activity(Label = "NetworkStateManagement", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
  8. public class MainActivity : AndroidGameActivity
  9. {
  10. protected override void OnCreate(Bundle savedInstanceState)
  11. {
  12. base.OnCreate(savedInstanceState);
  13. var game = new NetworkStateManagementGame();
  14. SetContentView((game.Services.GetService(typeof(View)) as View));
  15. game.Run();
  16. }
  17. }
  18. }