use support libs for DrawableWrapper (#8106) fixes #6291
authorAlan Grgic <alan.grgic@gmail.com>
Fri, 25 Oct 2019 11:37:46 +0000 (06:37 -0500)
committerRui Marinho <me@ruimarinho.net>
Fri, 25 Oct 2019 11:37:46 +0000 (12:37 +0100)
Xamarin.Forms.Platform.Android/Renderers/ShellSearchView.cs

index fadd72f..987d9da 100644 (file)
@@ -15,6 +15,7 @@ using AColor = Android.Graphics.Color;
 using AView = Android.Views.View;
 using LP = Android.Views.ViewGroup.LayoutParams;
 using AImageButton = Android.Widget.ImageButton;
+using ASupportDrawable = Android.Support.V7.Graphics.Drawable;
 
 namespace Xamarin.Forms.Platform.Android
 {
@@ -207,8 +208,7 @@ namespace Xamarin.Forms.Platform.Android
                        _textBlock.Threshold = 1;
                        _textBlock.Adapter = new ShellSearchViewAdapter(SearchHandler, _shellContext);
                        _textBlock.ItemClick += OnTextBlockItemClicked;
-                       if (Forms.IsMarshmallowOrNewer)
-                               _textBlock.SetDropDownBackgroundDrawable(new ClipDrawableWrapper(_textBlock.DropDownBackground));
+                       _textBlock.SetDropDownBackgroundDrawable(new ClipDrawableWrapper(_textBlock.DropDownBackground));
 
                        // A note on accessibility. The _textBlocks hint is what android defaults to reading in the screen
                        // reader. Therefore, we do not need to set something else.
@@ -367,7 +367,7 @@ namespace Xamarin.Forms.Platform.Android
                        }
                }
 
-               class ClipDrawableWrapper : DrawableWrapper
+               class ClipDrawableWrapper : ASupportDrawable.DrawableWrapper
                {
                        public ClipDrawableWrapper(Drawable dr) : base(dr)
                        {