📜  从光标 android 获取数据 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:09.627000             🧑  作者: Mango

代码示例1
if (cursor.moveToFirst()) {                                                                  
do {                                                            
    String x  = cursor.getString(cursor.getColumnIndex("event_name"));                  
    System.out.println("Cursor ::::::" + x);                                            
    listViewModel.setEventDate(cursor.getString(cursor.getColumnIndex("event_date")));   
    modelList.add(listViewModel);                                                        
}while (cursor.moveToNext());