How can I detect if a new listener has been registered for any widget in my android app? Is there a place where I can intercept the listener when it’s being registered?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I may be misunderstanding but you could do something like:
And
Finally, subclass your own custom widgets and modify the
addXListener()andremoveXListener()methods to fire your custom events if any have been added to the component. Then you just create your “Listener” class as per normal and implement your new Listener interface and so on.It’s a bit long and drawn out, again, I may have misunderstood exactly what you were after.