java - Cant get the Id from listview right -
so have android app has listview populated sqlite database, im trying id of item when button click outputting 2 numbers not one. instead of answer being 5 5,1
heres method:
public void onclick(view view) { toast.maketext(view.getcontext(),"id of item: "+ myadapter.choreslist.get(postion),toast.length_short).show(); //choreapp.dbmanager.deleteoneitem(i); } });
get id model class below code;
call getid() method model class;
public void onclick(view view) { toast.maketext(view.getcontext(),"id of item: "+ myadapter.choreslist.get(postion).getid(),toast.length_short).show(); //choreapp.dbmanager.deleteoneitem(i); } });
Comments
Post a Comment