Cursor c = managedQuery(People.CONTENT_URI,null,null,null,People.NAME);
String[] cols = new String[]{People.NAME};
int[] views = new int[]{android.R.id.text1};
SimpleCursorAdapter sca = new SimpleCursorAdapter(this,android.R.layout.simple_list_item_1,c,cols,views);
listview.setAdapter(adapter);
我正在使用此代碼段將ListView
與Cursor
連接起來。Simplecursoradapter的工作
我要問
String[] cols = new String[]{People.NAME};
int[] views = new int[]{android.R.id.text1};
究竟?
,並請有關SimpleCursorAdapter