summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs
diff options
context:
space:
mode:
authorRui Marinho <me@ruimarinho.net>2016-05-27 12:17:38 +0100
committerRui Marinho <me@ruimarinho.net>2016-05-27 12:17:38 +0100
commit2e75020b0ff028c70920074f32b996ead3a8f2bb (patch)
treee59fa77bd670dd8c5163ea6d060d6e1a6cb3ef14 /Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs
parent89aee2a3c2c592cf5a3c5d5f9a7415979f4b0748 (diff)
downloadxamarin-forms-2e75020b0ff028c70920074f32b996ead3a8f2bb.tar.gz
xamarin-forms-2e75020b0ff028c70920074f32b996ead3a8f2bb.tar.bz2
xamarin-forms-2e75020b0ff028c70920074f32b996ead3a8f2bb.zip
[Android] UpdateToolbar when page is added before on non AppCompact (#195)
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs
index 395a0f82..dc9a8fe1 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs
@@ -131,6 +131,15 @@ namespace Xamarin.Forms.Platform.Android
void InsertPageBefore(Page page, Page before)
{
+
+ int index = Element.InternalChildren.IndexOf(before);
+ if (index == -1)
+ throw new InvalidOperationException("This should never happen, please file a bug");
+
+ Device.StartTimer(TimeSpan.FromMilliseconds(0), () => {
+ ((Platform)Element.Platform).UpdateNavigationTitleBar();
+ return false;
+ });
}
void OnInsertPageBeforeRequested(object sender, NavigationRequestedEventArgs e)