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

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -