public void OnTextChanged(ICharSequence s, int start, int before, int count) { List <StatsTables> searchedList = (from table in mListStatsTable where table.table_name.Contains(mSearch.Text, StringComparison.OrdinalIgnoreCase) select table).ToList <StatsTables>(); mStatsTableAdapter = new StatsTableAdapter(mContext, Resource.Layout.StatsTableRow, searchedList); mListView.Adapter = mStatsTableAdapter; }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.Inflate(Resource.Layout.StatsTableAllTable, container, false); mListView = view.FindViewById <ListView>(Resource.Id.listViewStatsTable); mSearch = view.FindViewById <EditText>(Resource.Id.etSearch); mContainerListView = view.FindViewById <LinearLayout>(Resource.Id.containerListView); mDesign = view.FindViewById <Design>(Resource.Id.HelpEr); mContext = container.Context; mDesign.Alpha = 0; mDesign.Focusable = false; mSearch.Focusable = false; mSearch.AddTextChangedListener(this); mListStatsTable = mWebService.GetAllDataStatsTable(); mStatsTableAdapter = new StatsTableAdapter(container.Context, Resource.Layout.StatsTableRow, mListStatsTable); mListView.Adapter = mStatsTableAdapter; return(view); }