我有一個使用SimpleCursorAdapter填充的ListView。 listview顯示我的數據庫的一列的內容。該專欄只是我在數據庫中創建的課程(如英語,數學)。我也有每個課程的主題(如閱讀書寫..)。這也是同一張表的一列。在我的listView中它只顯示「英語」,但我想顯示「英語 - 閱讀」,所以我可以有所作爲。在SimpleView中使用SimpleCursorAdapter顯示多個列
我該怎麼做?
順便說一句,我的課的欄是'branche_cours',而我想顯示的另一欄是'指定'。
這裏是我的SimpleCursorAdapter
lvCours =(ListView)findViewById(R.id.ListCours);
final Cursor cursor = dbhelper.getAllCours();
String[] from = { "branche_cours" }; int[] to = { android.R.id.text1 };
adapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, cursor, from, to, 0);
lvCours.setAdapter(adapter);
adapter.notifyDataSetChanged();
我還沒找到解決方案呢.. – Dom