MainActivity.cs 1006 B

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