adapter.RemoveData(index);
- if(index < dropDownMenuFullList.ChildCount)
+ if(index < dropDownMenuFullList?.ChildCount)
{
- View childToRemove = dropDownMenuFullList.GetChildAt((uint)index);
+ View childToRemove = dropDownMenuFullList?.GetChildAt((uint)index);
if (childToRemove)
{
childToRemove.TouchEvent -= ListItemTouchEvent;
- dropDownMenuFullList.Remove(childToRemove);
+ dropDownMenuFullList?.Remove(childToRemove);
dropDownMenuFullList?.Layout?.RequestLayout();
}
}
data.IsSelected = false;
}
DropDownItemView listItemView = dropDownMenuFullList.GetChildAt((uint)selectedItemIndex) as DropDownItemView;
- data.IsSelected = false;
+ if(data != null)
+ {
+ data.IsSelected = false;
+ }
SetListItemToSelected(listItemView);
}
{
itemDataStyle.BackgroundColor = new Selector<Color>();
}
+ if (null != itemDataStyle.BackgroundColor)
+ {
+ itemDataStyle.BackgroundColor.Clone(value);
+ }
- itemDataStyle.BackgroundColor.Clone(value);
}
}