[Shell, Android] Fixes crash on api 22 or less (#6198)

fixes #6197
This commit is contained in:
Pavel Yakovlev 2019-05-28 10:56:31 -07:00 коммит произвёл Samantha Houts
Родитель c093b718d6
Коммит 6f13194515
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -204,7 +204,8 @@ namespace Xamarin.Forms.Platform.Android
_textBlock.Threshold = 1;
_textBlock.Adapter = new ShellSearchViewAdapter(SearchHandler, _shellContext);
_textBlock.ItemClick += OnTextBlockItemClicked;
_textBlock.SetDropDownBackgroundDrawable(new ClipDrawableWrapper(_textBlock.DropDownBackground));
if (Forms.IsMarshmallowOrNewer)
_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.