summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
authorSamantha Houts <samantha@teamredwall.com>2016-10-06 17:17:51 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-10-06 17:17:51 (GMT)
commitba6caad23ed7abdb1661cc61114c24eb3ae09da1 (patch)
treeb37f5e071b8e73cee49a56d53483b6600fb819c9 /Xamarin.Forms.Platform.Android
parent5727172ba8bb98391e023f208b747e6f193e8693 (diff)
downloadxamarin-forms-ba6caad23ed7abdb1661cc61114c24eb3ae09da1.zip
xamarin-forms-ba6caad23ed7abdb1661cc61114c24eb3ae09da1.tar.gz
xamarin-forms-ba6caad23ed7abdb1661cc61114c24eb3ae09da1.tar.bz2
[A] Prevent blank page from appearing when MainPage is switched (#421)
* repro * [A]Add horrible hack to prevent background flashing when swapping MainPage * cleanup repro * Revert "[A]Add horrible hack to prevent background flashing when swapping MainPage" This reverts commit d0fdc3856d0eaa5ec781f790d524ad7624a26560. * [A] E.Z.'s less magical but just as effective solution
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/MasterDetailContainer.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/MasterDetailContainer.cs b/Xamarin.Forms.Platform.Android/AppCompat/MasterDetailContainer.cs
index 1b85b42..fad745a 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/MasterDetailContainer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/MasterDetailContainer.cs
@@ -1,5 +1,6 @@
using Android.App;
using Android.Content;
+using Android.OS;
using Fragment = Android.Support.V4.App.Fragment;
using FragmentManager = Android.Support.V4.App.FragmentManager;
using FragmentTransaction = Android.Support.V4.App.FragmentTransaction;
@@ -82,7 +83,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
// The renderers for NavigationPage and TabbedPage both host fragments, so they need to be wrapped in a
// FragmentContainer in order to get isolated fragment management
Fragment fragment = FragmentContainer.CreateInstance(page);
-
+
var fc = fragment as FragmentContainer;
fc?.SetOnCreateCallback(pc =>
@@ -100,10 +101,12 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
}
transaction.Add(Id, fragment);
- transaction.SetTransition((int)FragmentTransit.FragmentOpen);
+ transaction.SetTransition((int)FragmentTransit.None);
transaction.Commit();
_currentFragment = fragment;
+
+ new Handler(Looper.MainLooper).PostAtFrontOfQueue(() => FragmentManager.ExecutePendingTransactions());
}
}