I have a View with a ListView appended, which actually uses a custom view item done programatically. Inside each list item I have a button which I need to track, to update another item in the view. It is only invalidated when you click on the list item button, not anywhere else in the list item.
So I thought of creating a custom Listener. I trigger it when the button is clicked, but I have no way to access it from the ListView activity.
Is there a way to simulate those setOnItem...Listener‘s using a custom listener? Thanks in advance
Please see this link to help with how to set
onClickListenerfrom within customListAdapters.You can use the
myButton.getTag()andmyButton.setTag()to put and get data to/from yourView/Button.See this link as well to help with custom
ListAdapters.Here is another good example I found of how to use a custom adapter.