MainActivity.cs 886 B

123456789101112131415161718192021222324252627
  1. using Android.App;
  2. using Android.Content.PM;
  3. using Avalonia;
  4. using Avalonia.Android;
  5. using Avalonia.ReactiveUI;
  6. using VeloeAvaloniaKemonoPartyApp.ViewModels;
  7. namespace VeloeAvaloniaKemonoPartyApp.Android
  8. {
  9. [Activity(
  10. Label = "VeloeAvaloniaKemonoPartyApp.Android",
  11. Theme = "@style/MyTheme.NoActionBar",
  12. Icon = "@drawable/icon",
  13. MainLauncher = true,
  14. ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
  15. public class MainActivity : AvaloniaMainActivity<App>
  16. {
  17. protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
  18. {
  19. Services.RegisteredServices.OpenUrlService = new AndroidOpenUrlService();
  20. return base.CustomizeAppBuilder(builder)
  21. .WithInterFont()
  22. .UseReactiveUI();
  23. }
  24. }
  25. }