summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
authorPaul DiPietro <pauldipietro@users.noreply.github.com>2016-09-30 19:29:01 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-09-30 19:29:01 (GMT)
commitf1689cf0868ad15cae312402aa01735bbdb7e8bd (patch)
treeb29b7fcbae89f410ca10f276adb6058ff17f3d93 /Xamarin.Forms.Platform.Android
parent97bc024a0ede694d867e65568aa045acfa6b99b3 (diff)
downloadxamarin-forms-f1689cf0868ad15cae312402aa01735bbdb7e8bd.zip
xamarin-forms-f1689cf0868ad15cae312402aa01735bbdb7e8bd.tar.gz
xamarin-forms-f1689cf0868ad15cae312402aa01735bbdb7e8bd.tar.bz2
[A] Check for ViewStates.Gone in AppCompat TabbedPageRenderer (#365)
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
index ca0f733..e2d4765 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
@@ -209,11 +209,14 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
tabs.Measure(MeasureSpecFactory.MakeMeasureSpec(width, MeasureSpecMode.Exactly), MeasureSpecFactory.MakeMeasureSpec(height, MeasureSpecMode.AtMost));
var tabsHeight = 0;
- //MinimumHeight is only available on API 16+
- if ((int)Build.VERSION.SdkInt >= 16)
- tabsHeight = Math.Min(height, Math.Max(tabs.MeasuredHeight, tabs.MinimumHeight));
- else
- tabsHeight = Math.Min(height, tabs.MeasuredHeight);
+ if (tabs.Visibility != ViewStates.Gone)
+ {
+ //MinimumHeight is only available on API 16+
+ if ((int)Build.VERSION.SdkInt >= 16)
+ tabsHeight = Math.Min(height, Math.Max(tabs.MeasuredHeight, tabs.MinimumHeight));
+ else
+ tabsHeight = Math.Min(height, tabs.MeasuredHeight);
+ }
pager.Measure(MeasureSpecFactory.MakeMeasureSpec(width, MeasureSpecMode.AtMost), MeasureSpecFactory.MakeMeasureSpec(height, MeasureSpecMode.AtMost));