我在做记事本练习1。当我创建fillData方法时,我得到一个错误“游标无法解析为类型”
这是我的代码:
private void fillData() {
//get notes from DB and create item list
Cursor c = mDbHelper.fetchAllNotes();
startManagingCursor(c);
String[] from = new String [] { NotesDbAdapter.KEY_TITLE };
int[] to = new int[] { R.id.text1 };
SimpleCursorAdapter notes =
new SimpleCursorAdapter(this, R.layout.notes_row, c, from, to);
setListAdapter(notes);
}
我需要导入java文件顶部的cursor类吗?如果是,怎么做?