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

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -