Porting fix from 4794 to handle clip bounds on sub-API-19 Android; fixes #4790 (...
authorE.Z. Hart <hartez@users.noreply.github.com>
Thu, 11 Apr 2019 04:28:11 +0000 (22:28 -0600)
committerSamantha Houts <samhouts@users.noreply.github.com>
Thu, 11 Apr 2019 04:28:11 +0000 (21:28 -0700)
fixes #4790

Xamarin.Forms.Platform.Android/CollectionView/ItemsViewRenderer.cs

index 6041930..5e4fcdf 100644 (file)
@@ -10,6 +10,7 @@ using Android.Widget;
 using Xamarin.Forms.Internals;
 using Xamarin.Forms.Platform.Android.FastRenderers;
 using AView = Android.Views.View;
+using AViewCompat = Android.Support.V4.View.ViewCompat;
 
 namespace Xamarin.Forms.Platform.Android
 {
@@ -48,7 +49,7 @@ namespace Xamarin.Forms.Platform.Android
                protected override void OnLayout(bool changed, int l, int t, int r, int b)
                {
                        base.OnLayout(changed, l, t, r, b);
-                       ClipBounds = new Rect(0,0, Width, Height);
+                       AViewCompat.SetClipBounds(this, new Rect(0, 0, Width, Height));
 
                        // After a direct (non-animated) scroll operation, we may need to make adjustments
                        // to align the target item; if an adjustment is pending, execute it here.