我有一个从sqlite填充的列表视图,其中包含不同的数据。我使用简单适配器填充列表。以下是我填写列表的代码:
ArrayList<HashMap<String, String>> userList = controller.getOld();
// If users exists in SQLite DB
if (userList.size() != 0) {
// Set the User Array list in ListView
ListAdapter adapter = new SimpleAdapter(OldTips.this, userList, R.layout.old_tips, new String[] {
"userId", "tara","ora_meci" ,"echipa_acasa","echipa_deplasare","cota","explicatii","rezultat","pauza","final"}, new int[] { R.id.userId, R.id.tara , R.id.ora_meci, R.id.echipa_acasa, R.id.echipa_deplasare, R.id.cota,R.id.explicatii,R.id.rezultat,R.id.pauza,R.id.finall});
final ListView myList = (ListView) findViewById(android.R.id.list);
m
myList.setAdapter(adapter);
}
在这种填充列表视图的特定方式中,有没有办法将节标题和每个节标题添加为我从sqlite获取的日期?我通过其他解决方案,但没有找到实现它的方法......