Added MainApplication class to Playground.Droid

This commit is contained in:
nmilcoff 2018-01-06 22:08:15 -03:00
Родитель a947984e31
Коммит 4c504c1ddc
3 изменённых файлов: 27 добавлений и 0 удалений

Просмотреть файл

@ -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();
}
}
}