ListView doesn't show android sqlite items -


i have problem showing data items sqlite database listview. when try see data after click button, shows:

com.locationreminder , task@4053afb0

it's weird.

this readreminder.java

import java.util.arraylist; import android.app.listactivity; import android.os.bundle; import android.widget.arrayadapter;  public class readreminder extends listactivity { private dbreminder operasidb; private arraylist<task> daftartugas;   @override  public void oncreate(bundle savedinstancestate) {      super.oncreate(savedinstancestate);      setcontentview(r.layout.read_task);      operasidb = new dbreminder(this);       daftartugas = operasidb.viewalltask();      arrayadapter<task> adapter = new arrayadapter<task>(this,          android.r.layout.simple_list_item_1, daftartugas);       setlistadapter(adapter);  } } 

this code show data database

public arraylist<task> viewalltask() {     openconn();     arraylist<task> tugas = new arraylist<task>();     cursor curs = db.rawquery("select * " + tablename, null);     if (curs.movetofirst()) {         {             task task = new task();             task.setid(integer.parseint(curs.getstring(curs.getcolumnindex(id))));     task.setlatitude(integer.parseint(curs.getstring(curs.getcolumnindex(latitude))));                task.setlongitude(integer.parseint(curs.getstring(curs.getcolumnindex(longitude))); task.setradius(integer.parseint(curs.getstring(curs.getcolumnindex(radius)))); task.setalamat(curs.getstring(curs.getcolumnindex(alamat))); task.setkonteks(curs.getstring(curs.getcolumnindex(konteks_tugas))); tugas.add(task);         } while (curs.movetonext());     }     closeconn();     return tugas; } 

in sqlite manager eclipse, data appear table. please me. thank you...

you have create own adapter extending arrayadapter class.


Comments