Ejemplo n.º 1
0
 private void SetupRecycleView()
 {
     myRecycleView.SetLayoutManager(new Android.Support.V7.Widget.LinearLayoutManager(myRecycleView.Context));
     adapter = new AdapterDrugs(DrugsList);
     adapter.DeleteItemClick += Adapter_DeleteItemClick;
     myRecycleView.SetAdapter(adapter);
 }
Ejemplo n.º 2
0
        private void SearchText_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            List <Drugs> searchResult =
                (from drug in DrugsList
                 where
                 drug.Name.ToLower().Contains(searchText.Text.ToLower()) ||
                 drug.ActiveSubstance.ToLower().Contains(searchText.Text.ToLower()) ||
                 drug.Form.ToLower().Contains(searchText.Text.ToLower()) ||
                 drug.Group.ToLower().Contains(searchText.Text.ToLower())
                 select drug).ToList();

            adapter = new AdapterDrugs(searchResult);
            myRecycleView.SetAdapter(adapter);
        }