Merge pull request #225 from irihitech/android
feat: fix android demo start activity issue.
This commit is contained in:
commit
367aa0a386
@ -4,9 +4,9 @@ using Avalonia.Android;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Android;
|
||||
|
||||
[Activity(Label = "Semi.Avalonia.Demo.Android", Icon = "@drawable/Icon", Theme = "@style/MyTheme.NoActionBar",
|
||||
LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize)]
|
||||
public class MainActivity : AvaloniaMainActivity
|
||||
[Activity(Label = "Semi.Avalonia.Demo.Android", Icon = "@drawable/Icon", MainLauncher = true, Theme = "@style/MyTheme.NoActionBar",
|
||||
LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
|
||||
public class MainActivity : AvaloniaMainActivity<App>
|
||||
{
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Avalonia;
|
||||
using Avalonia.Android;
|
||||
using Application = Android.App.Application;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Android;
|
||||
|
||||
[Activity(Theme = "@style/MyTheme.Splash", MainLauncher = true, NoHistory = true)]
|
||||
public class SplashActivity: AvaloniaMainActivity<App>
|
||||
{
|
||||
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
|
||||
{
|
||||
return base.CustomizeAppBuilder(builder);
|
||||
}
|
||||
|
||||
protected override void OnResume()
|
||||
{
|
||||
base.OnResume();
|
||||
StartActivity(new Intent(Application.Context, typeof(MainActivity)));
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user