summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
authoradrianknight89 <adrianknight89@outlook.com>2016-09-30 18:57:28 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-09-30 18:57:28 (GMT)
commit353525e293716d16c74741c96ed1bcd628c24363 (patch)
treeaa1710eb1be9bccc7ec7a2412157fc62babc1e34 /Xamarin.Forms.Platform.Android
parentfa2f01680d23a813a5b1ab7795151b6dcb0feb7f (diff)
downloadxamarin-forms-353525e293716d16c74741c96ed1bcd628c24363.zip
xamarin-forms-353525e293716d16c74741c96ed1bcd628c24363.tar.gz
xamarin-forms-353525e293716d16c74741c96ed1bcd628c24363.tar.bz2
[Android] Forward appearing / disappearing methods only for the last item on the stack (#342)
* [Android] Forward appearing / disappearing methods only for the last item on the stack * use tabs
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/FragmentContainer.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/FragmentContainer.cs b/Xamarin.Forms.Platform.Android/AppCompat/FragmentContainer.cs
index 62e4380..c44d711 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/FragmentContainer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/FragmentContainer.cs
@@ -119,14 +119,19 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
public override void OnPause()
{
- PageController?.SendDisappearing();
+ Page currentPage = (Application.Current.MainPage as IPageContainer<Page>)?.CurrentPage;
+ if (currentPage == null || currentPage == PageController)
+ PageController?.SendDisappearing();
+
base.OnPause();
}
public override void OnResume()
{
- if (UserVisibleHint)
- PageController?.SendAppearing();
+ Page currentPage = (Application.Current.MainPage as IPageContainer<Page>)?.CurrentPage;
+ if (UserVisibleHint && (currentPage == null || currentPage == PageController))
+ PageController?.SendAppearing();
+
base.OnResume();
}
}