In Android, specifying a method in a button's XML onClick
property causes that method to get called on button click. Given the button view, is there a way to find out what method is going to get called programmatically? I've looked at the available public methods for Views, but I can't find anything in regards to getting view properties that might help. I know that Android creates an onClick listener in the android.view.View$1
class for buttons defined in this way, and I was hoping there might be a way to use reflection to find the method I'm after.
samedi 31 octobre 2015
Programmatically get method of XML button onClick attribute in Android
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire