android sqlite - Deleting a tuple from Database -
in app there button. when pressed user framelayout added contains textview , samll delete button. whenever user presses delete button tuple should deleted database. m facing problem in this. pressing delete button how come know instance passed delete funtion
when adding new view, can set id (or other object) value of view using settag()
btn.settag(itemid);
then when click on button, tag back, , use it:
listener = new onclicklistener() { @override public void onclick(view v) { deletebyid(v.gettag()); } };
read more settag in android's api.
Comments
Post a Comment