0
是否有可能让SimpleCursorAdapter
检索多个项目并让它们显示?这是从Android记事本教程(编辑了一下),当我试图让它拉AScoresDbAdapter.KEY_COL2_NAME, AScoresDbAdapter.KEY_COL1_DATE
它只显示第一个在TextView
setListAdapter多个项目?
是有原因还是我错过了什么?
private void fillData() {
// Get all of the notes from the database and create the item list
Cursor c = scoresDbAdapter.fetchAllNotes();
startManagingCursor(c);
String[] from = new String[] { AScoresDbAdapter.KEY_COL2_NAME, AScoresDbAdapter.KEY_COL1_DATE};
int[] to = new int[] { R.id.text1 };
// Now create an array adapter and set it to display using our row
SimpleCursorAdapter notes =
new SimpleCursorAdapter(this, R.layout.shots_row, c, from, to,0);
setListAdapter(notes);
}