MainActivity.cs 664 B

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