I was busy with the exercise "Notepad" 1. When I create the fillData method, I get the error message "The cursor cannot be resolved to type"
Here is my code:
private void fillData() {
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);
}
Do I need to import a cursor class at the top of my java file? If so, how?
source
share