【发布时间】:2026-01-13 15:40:01
【问题描述】:
我从database 获得一些数据,并将其显示到listview 中,SimpleCursosAdapter 带有此代码:
SimpleCursorAdapter adapter = new SimpleCursorAdapter(App.getAppContext(),R.layout.list_view_row,c,
new String[] { "titolo_testo","titolo_sezione","text" },
new int[] { R.id.label_testo , R.id.label_materia , R.id.label_testo }, CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);
我想要的是添加一个字段:
new String[] { "titolo_testo","titolo_sezione","titolo_materia","text" }
然后放
"titolo_sezione","titolo_materia"同标签R.id.label_materia
最好的方法是什么?
【问题讨论】:
标签: android simplecursoradapter