I am new to android and am trying to develop a new android app. But I am struggling to siolve one of the problems in my project.
I am using a listview extended from baseadapter and need to add a button in each row of thelistview. When I click on the button in any row of the listview, I want that it should be removed. However when I do so, some of the other buttons also get removed in the listview.
How can I solve this problem? Thank you..
You have an adapter, activity and some sort of data source
In your adapter you attach some data to buttons to be able to tell one from another:
in your activity you mark button id as the one to be hidden:
and then ListAdapter changes like this:
and when you want your adatper to change you, don’t forget to call
Sorry for any errors in my code, but i just wanted to give you an idea.