2023-12-04 15:49:31 +08:00
|
|
|
|
using Android.App;
|
|
|
|
|
using Android.Content.PM;
|
|
|
|
|
using Avalonia;
|
|
|
|
|
using Avalonia.Android;
|
|
|
|
|
using Avalonia.ReactiveUI;
|
2023-12-05 20:11:38 +08:00
|
|
|
|
using Notes.ViewModels;
|
2023-12-04 15:49:31 +08:00
|
|
|
|
|
|
|
|
|
namespace Notes.Android;
|
|
|
|
|
|
|
|
|
|
[Activity(
|
2023-12-06 11:03:26 +08:00
|
|
|
|
Label = "Notes.UI.Android",
|
2023-12-04 15:49:31 +08:00
|
|
|
|
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)
|
|
|
|
|
{
|
2023-12-05 20:11:38 +08:00
|
|
|
|
|
|
|
|
|
var services = new Services();
|
|
|
|
|
services.Register<IFileService>(new FileService());
|
|
|
|
|
App.services = services;
|
2023-12-04 15:49:31 +08:00
|
|
|
|
return base.CustomizeAppBuilder(builder)
|
|
|
|
|
.WithInterFont()
|
|
|
|
|
.UseReactiveUI();
|
|
|
|
|
}
|
|
|
|
|
}
|