我想要從sqlite的分貝的datagridview的Android Startmanaging光標
我發現下面的代碼在網上
private void populateGrid()
{
ListView lv = (ListView)findViewById(R.id.listView1);
Cursor c = dbHelper.fetchAllScores();
startManagingCursor(cursor);
String[] cols = new String[] { TodoDbAdapter.KEY_PLAYDATE, TodoDbAdapter.KEY_NUMVALA, TodoDbAdapter.KEY_NUMVALB};
int[] views = new int[] { R.id.txt_date, R.id.txt_no, R.id.txt_yes};
// Now create an array adapter and set it to display using our row
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
R.layout.listviewtemp, c, cols, views);
Log.w("NumRows",adapter.getCount() + "");
lv.setAdapter(adapter);
}
但我geeting沒有找到方法startManagingCursor(光標);我有什麼權利在這種方法,或者我忘記導入的東西? plz help
使用'getActivity()。startManagingCursor(c);'代替 – 2014-03-08 10:05:49