Hi i am reading sqlite db data and store into string buffer. I want to display it in the list view in android. i am facing little problem. please help me to solve this issue.
String studentno=cursor.getString(1);
String date=cursor.getString(2);
buffer.append("student: "+studentno+" Time:"+date+"\n");
String data=buffer.toString();
Log.d("student: "+studentno+" Time:"+date);
the output is:student: 1234 Time:12:13
student: 1234 Time:12:14
student: 1234 Time:12:15
I want to store string buffer like this
values[0]=student: 1234 Time:12:13
values[1]=student: 1234 Time:12:14
values[2]=student: 1234 Time:12:15
i tried below coding but its not working.
String[] values = data.split("");
for (int i = 0; i < values.length; ++i) {
list.add(values[i]);
}
is there any way to do this. thanks in advance.