Added MainApplication class to Playground.Droid
This commit is contained in:
Родитель
a947984e31
Коммит
4c504c1ddc
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using Android.App;
|
||||
using Android.Runtime;
|
||||
using MvvmCross.Droid.Views;
|
||||
|
||||
namespace Playground.Droid
|
||||
{
|
||||
[Application]
|
||||
public class MainApplication : MvxAndroidApplication
|
||||
{
|
||||
public MainApplication(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -113,6 +113,7 @@
|
|||
<Compile Include="Views\SplitDetailNavView.cs" />
|
||||
<Compile Include="Views\NestedChildView.cs" />
|
||||
<Compile Include="Views\TabsRootBView.cs" />
|
||||
<Compile Include="MainApplication.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\AboutResources.txt" />
|
||||
|
|
|
@ -5,6 +5,8 @@ using Android.Views;
|
|||
using MvvmCross.Binding.Droid.BindingContext;
|
||||
using MvvmCross.Droid.Support.V4;
|
||||
using MvvmCross.Droid.Views.Attributes;
|
||||
using MvvmCross.Platform;
|
||||
using MvvmCross.Platform.Droid.Platform;
|
||||
using Playground.Core.ViewModels;
|
||||
|
||||
namespace Playground.Droid.Views
|
||||
|
@ -30,5 +32,13 @@ namespace Playground.Droid.Views
|
|||
|
||||
return view;
|
||||
}
|
||||
|
||||
public override void OnPause()
|
||||
{
|
||||
var top = Mvx.Resolve<IMvxAndroidCurrentTopActivity>();
|
||||
var activity = top.Activity;
|
||||
|
||||
base.OnPause();
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче