SimpleCursorAdapter を介してデータベースから ListView にデータを配置しようとすると、ListView の行が表示されますが、空です。
お気に入り:
[ _ _ _ _ _ ____ ]
[ _ _ _ _ _ ____ ]
[ _ _ _ _ _ ____ ]
それ以外の:
[文章]
[文章]
[文章]
私のコード:
db = provider.getReadableDatabase();
String[] columns = {"_id", "Title"};
Cursor cursor = db.query(NotificationsProvider.TABLE_NAME, columns, null, null, null, null, null);
Log.d(TAG, "COUNT: "+cursor.getCount());
String[] clm = {"Title"};
int[] to = {android.R.id.list};
cursorAdapter = new SimpleCursorAdapter(this,
android.R.layout.simple_list_item_1,
cursor, clm, to, 0);
setListAdapter(cursorAdapter);
ありがとう!