I want to display all the data on my list view.... but below code sawing me
only one data which i have inserted last.
DBHandlerclass dbHandl = new DBHandlerclass(getApplicationContext());
List<POJO_Student> studentList = dbHandl.getAllContacts();
int std = studentList.size();
ArrayAdapter<String> adapter = null;
for(int i=0;i<=std;i++)
{
for (POJO_Student pj : studentList) {
String Emailid = pj.getId();
String Fname = pj.getFname();
String Lname =pj.getLname();
String[] log = {Emailid+"\n "+Fname+"\n "+Lname};
adapter = new ArrayAdapter<String>(this,R.layout.student_list,
R.id.txt_list,log);
}
setListAdapter(adapter);
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en