CursorAdapter: Adapter that exposes data from a Cursor to a ListView widget. The Cursor must include a column named "_id" or this class will not work.
cur=dbHelper.getalldata();
cur.moveToFirst();
//startManagingCursor(cur);
String [] from = new String []{dbHelper.ColUser,dbHelper.ColPhNo};
int [] to = new int []{R.id.title123,R.id.message123};
final ListAdapter simple = new SimpleCursorAdapter(this,R.layout.diarylist,cur,from,to);
LV1.setAdapter(simple);
cur=dbHelper.getalldata();
cur.moveToFirst();
//startManagingCursor(cur);
String [] from = new String []{dbHelper.ColUser,dbHelper.ColPhNo};
int [] to = new int []{R.id.title123,R.id.message123};
final ListAdapter simple = new SimpleCursorAdapter(this,R.layout.diarylist,cur,from,to);
LV1.setAdapter(simple);
0 comments: