MainActivity.cs 635 B

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