protected override void OnResume() { base.OnResume (); pessoas = StockRepository.GetStocks().ToList(); // cria um adapter ListPessoas = new StockListAdapter(this, pessoas); // set o adp para a lista de pessoas ListViewPessoas.Adapter = ListPessoas; }
protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); // Get all the stock data in a cursor var db = new StockDatabase(this); var cursor = db.ReadableDatabase.RawQuery ("SELECT * FROM Stocks", null); // Provide the adapter with the data ListAdapter = new StockListAdapter (this, cursor); }
protected override void OnResume () { base.OnResume (); tasks = StockRepository.GetStocks().ToList(); // create our adapter taskList = new StockListAdapter(this, tasks); //Hook up our adapter to our ListView taskListView.Adapter = taskList; }