public void Filter(string searchText) { if (!string.IsNullOrEmpty(searchText)) { candyList = Candy.DefaultList().Where(c => c.Name.Contains(searchText.ToLower())).ToList(); } else { candyList = Candy.DefaultList(); } NotifyDataSetChanged(); }
public CandyAdapter(Activity context) { this.context = context; candyList = Candy.DefaultList(); }