public bool OnQueryTextSubmit(string query) { adapter.Clear(); adapter.AddAll(NodoRepo.List(query)); adapter.NotifyDataSetChanged(); return(true); }
public bool OnQueryTextChange(string newText) { if (String.IsNullOrEmpty(newText)) { adapter.Clear(); adapter.AddAll(NodoRepo.List()); adapter.NotifyDataSetChanged(); } return(true); }
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) { base.OnActivityResult(requestCode, resultCode, data); if (requestCode == 1 && resultCode == Result.Ok) { String path = GetPathFromURI(this, data.Data); CsvImporter importer = new CsvImporter(); importer.Import(path); adapter.Clear(); adapter.AddAll(NodoRepo.List()); adapter.NotifyDataSetChanged(); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); ListView list = FindViewById <ListView> (Resource.Id.list); list.ItemClick += List_ItemClick; List <Nodo> nodi = NodoRepo.List(); adapter = new NodoAdapter(this, Resource.Layout.fragment_nodi_item, nodi); list.Adapter = adapter; }