2
我使用SimpleCursorAdapter
來填補我的名單如下:如何讓我的SimpleCursorAdapter自動刷新?
adapter = new SimpleCursorAdapter(this, R.layout.fang_listlayout,
MainController.getInstance().getCursor(),
new String[] {"Foo", "Foo2"},
new int[] {R.id.foo1, R.id.foo2}, 0);
現在我要實現,當某事在Cursor
改變了我想自動refesh列表中的內容。
該如何實現?
這裏看看:http://stackoverflow.com/questions/5430862/difference-between- contentobserver-and-datasetobserver –
http://stackoverflow.com/a/1986071/1339473 ...只要你通過adatper.requery()進入數據庫這個更新,那麼每次這是更新數據庫 – QuokMoon