2023-03-20 19:57:51 +08:00
|
|
|
using Android.App;
|
|
|
|
using Android.Content.PM;
|
2024-08-23 11:05:08 +08:00
|
|
|
using Avalonia;
|
2023-03-20 19:57:51 +08:00
|
|
|
using Avalonia.Android;
|
|
|
|
|
2023-03-20 23:14:50 +08:00
|
|
|
namespace Semi.Avalonia.Demo.Android;
|
2023-03-20 19:57:51 +08:00
|
|
|
|
2023-08-30 00:13:26 +08:00
|
|
|
[Activity(
|
|
|
|
Label = "Semi.Avalonia",
|
|
|
|
Theme = "@style/MyTheme.NoActionBar",
|
|
|
|
Icon = "@drawable/Icon",
|
|
|
|
MainLauncher = true,
|
|
|
|
LaunchMode = LaunchMode.SingleTop,
|
|
|
|
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
|
2023-07-08 00:06:11 +08:00
|
|
|
public class MainActivity : AvaloniaMainActivity<App>
|
2023-03-20 19:57:51 +08:00
|
|
|
{
|
2024-08-23 11:05:08 +08:00
|
|
|
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
|
|
|
|
{
|
|
|
|
return base.CustomizeAppBuilder(builder)
|
|
|
|
.With(new AndroidPlatformOptions()
|
|
|
|
{
|
|
|
|
RenderingMode = [AndroidRenderingMode.Vulkan, AndroidRenderingMode.Egl, AndroidRenderingMode.Software]
|
|
|
|
});
|
|
|
|
}
|
2023-03-20 19:57:51 +08:00
|
|
|
}
|