From: E.Z. Hart Date: Thu, 11 Apr 2019 04:28:11 +0000 (-0600) Subject: Porting fix from 4794 to handle clip bounds on sub-API-19 Android; fixes #4790 (... X-Git-Tag: accepted/tizen/5.5/unified/20200421.150457~430^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6aad281eda3dbeaf650b803b768aac21c266cb19;p=platform%2Fcore%2Fcsapi%2Fxsf.git Porting fix from 4794 to handle clip bounds on sub-API-19 Android; fixes #4790 (#5863) fixes #4790 --- diff --git a/Xamarin.Forms.Platform.Android/CollectionView/ItemsViewRenderer.cs b/Xamarin.Forms.Platform.Android/CollectionView/ItemsViewRenderer.cs index 6041930..5e4fcdf 100644 --- a/Xamarin.Forms.Platform.Android/CollectionView/ItemsViewRenderer.cs +++ b/Xamarin.Forms.Platform.Android/CollectionView/ItemsViewRenderer.cs @@ -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.