I need to get the current onClickListener --and other kind of listeners-- of a View object in order to install a new proxy-onClickListener which will do some work and then forward the call to the original listener.
Many thanks!!!
I need to get the current onClickListener --and other kind of listeners-- of a View object in order to install a new proxy-onClickListener which will do some work and then forward the call to the original listener.
Many thanks!!!
You just need to be a little creative!
Just do something like this:
Subclass the View.OnClickListener
Make sure to have a subclassed view Like YourView that overrides the setOnClickListener and keeps a reference to the listener to access with getOnClickListner..
I have not tested this code in any way, treat it as pseudo code for what you need to do.
I hope this will Learn you a few things :)