I have got data from database in variable buffer and I want that data to be displayed in ListView
This is my adaper
private void setAdapterData() {
DBHelper db = new DBHelper(this);
for (students stud : CustomListViewValuesArr) {
db.insertContact(stud.getrollno(), stud.getfirst(), stud.getsecond(), stud.getper());
}
Log.d("Reading: ", "Reading all contacts..");
ArrayList<students> stu = db.getAllCotacts();
res = getResources();
adapter = new CustomAdapter(CustomListView, stu, res);
studentlist.setAdapter((ListAdapter) adapter);
}
Aucun commentaire:
Enregistrer un commentaire