summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-10-12 19:45:06 (GMT)
committerGitHub <noreply@github.com>2016-10-12 19:45:06 (GMT)
commit739802143552ea1d28544bd05718bf4feeeb5bed (patch)
tree083edbf67b161f0f3351e51507f70708ad1fb8f8 /Xamarin.Forms.Platform.Android
parenta64333e29ea6138bc9adf0346e724f155eae3bc9 (diff)
downloadxamarin-forms-739802143552ea1d28544bd05718bf4feeeb5bed.zip
xamarin-forms-739802143552ea1d28544bd05718bf4feeeb5bed.tar.gz
xamarin-forms-739802143552ea1d28544bd05718bf4feeeb5bed.tar.bz2
[A]Don't crash when emptying/populating TabbedPage.ItemsSource (#427)
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
index e2d4765..5149909 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
@@ -252,7 +252,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
TabLayout tabs = _tabLayout;
((FormsFragmentPagerAdapter<Page>)pager.Adapter).CountOverride = Element.Children.Count;
- pager.Adapter.NotifyDataSetChanged();
+
if (Element.Children.Count == 0)
tabs.RemoveAllTabs();
@@ -263,6 +263,8 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
tabs.SetOnTabSelectedListener(this);
}
+ pager.Adapter.NotifyDataSetChanged();
+
UpdateIgnoreContainerAreas();
}