Пример #1
0
 public bool OnQueryTextSubmit(string query)
 {
     adapter.Clear();
     adapter.AddAll(NodoRepo.List(query));
     adapter.NotifyDataSetChanged();
     return(true);
 }
Пример #2
0
 public bool OnQueryTextChange(string newText)
 {
     if (String.IsNullOrEmpty(newText))
     {
         adapter.Clear();
         adapter.AddAll(NodoRepo.List());
         adapter.NotifyDataSetChanged();
     }
     return(true);
 }
Пример #3
0
        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();
            }
        }
Пример #4
0
        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;
        }