SimpleCursorAdapter
An easy adapter to map columns from a cursor to TextViews or ImageViews defined in an XML file. You can specify which columns you want,which views you want to display the columns,and the XML file that defines the appearance of these views.
官方文档上是这么说的。
但是我一直没有跑成功老是有错误,没办法try-catch了。结果说 '_id' does not exist
郁闷了,在sqlite里面必须要有一个主键并且名字是_id,哎,屈服了,主键我建。
结果不报错了,但是没有显示数据到listview。又是_id取数据的字段数组中要有_id,
总算OK了。
@H_502_15@String sql="create table kkkkkk (_id INTEGER PRIMARY KEY AUTOINCREMENT,ttt text not null,name text not null)";
原文链接:https://www.f2er.com/sqlite/202731.html