summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-10-13 18:11:04 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-10-14 18:09:12 (GMT)
commit6d912f64242ab55d27b60e9f79d9a6b10f1d8e72 (patch)
tree0b5cace055cfc68bcbfc9e7960c5412ffac44804
parent25254097b80ef9bb7ebf5d119d2326dcccbedd88 (diff)
downloadxamarin-forms-6d912f64242ab55d27b60e9f79d9a6b10f1d8e72.zip
xamarin-forms-6d912f64242ab55d27b60e9f79d9a6b10f1d8e72.tar.gz
xamarin-forms-6d912f64242ab55d27b60e9f79d9a6b10f1d8e72.tar.bz2
[A] Better fix for BZ44129
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
index 5f36431..f91c532 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
@@ -250,9 +250,13 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
((FormsFragmentPagerAdapter<Page>)pager.Adapter).CountOverride = Element.Children.Count;
+ pager.Adapter.NotifyDataSetChanged();
if (Element.Children.Count == 0)
+ {
tabs.RemoveAllTabs();
+ tabs.SetupWithViewPager(null);
+ }
else
{
tabs.SetupWithViewPager(pager);
@@ -260,8 +264,6 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
tabs.SetOnTabSelectedListener(this);
}
- pager.Adapter.NotifyDataSetChanged();
-
UpdateIgnoreContainerAreas();
}