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

python - django admin: changing the way a field (w/ relationship to another model) is submitted on a form so that it can be submitted multiple times -

go - serving up pdfs using golang -

ffmpeg - Using Live555 HTTP capacities as a server for signaling -