1234567891011121314151617181920212223242526272829303132 |
- using Android.App;
- using Android.Content.PM;
- using Avalonia;
- using Avalonia.Android;
- using Avalonia.ReactiveUI;
- using Splat;
- using VeloeAvaloniaKemonoPartyApp.Android.Services;
- using VeloeAvaloniaKemonoPartyApp.Services;
- namespace VeloeAvaloniaKemonoPartyApp.Android
- {
- [Activity(
- Label = "VeloeKemonoParty",
- Theme = "@style/MyTheme.NoActionBar",
- Icon = "@drawable/icon",
- MainLauncher = true,
- ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
- public class MainActivity : AvaloniaMainActivity<App>
- {
- protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
- {
- Locator.CurrentMutable.RegisterLazySingleton<IOpenUrlService>(() => new AndroidOpenUrlService());
- Locator.CurrentMutable.RegisterLazySingleton<IStorageService>(() => new AndroidStorageService(CacheDir.AbsolutePath));
-
- return base.CustomizeAppBuilder(builder)
- .WithInterFont()
- .UseSkia().With(new SkiaOptions() { MaxGpuResourceSizeBytes = 512 * 1024 * 1024 })
- .With(new AndroidPlatformOptions() { RenderingMode = new[] { AndroidRenderingMode.Vulkan } })
- .UseReactiveUI();
- }
- }
- }
|