【发布时间】:2017-05-05 19:22:03
【问题描述】:
我有一个使用 SimpleCursorAdapter 填充的 ListView。列表视图显示我的数据库的一列的内容。该专栏只是我在数据库中创建的课程(如英语、数学)。我也有每节课的主题(比如阅读写作..)。这也是同一张表的一列。在我的 listView 中它只显示“英语”,但我想显示“英语 - 阅读”,所以我可以有所作为。
我该怎么做?
顺便说一句,我的课程栏目是“branche_cours”,而我要展示的另一栏目是“designation”。
这是我的 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();
【问题讨论】:
-
我还没有找到解决方案,伙计们..
标签: android listview simplecursoradapter