I have bunch of events for alertDialog, Button, Checkboxes etc in android application I have implemented the interfaces for event handling.
My question is how do I pass data which I want, which is coupled with main activity, to these event handling function lets onClick(View v){ }
There is method called setTag for View.What are my other options? I read that you should not keep on distributing activity/context objects otherwise it will lead to memory leaks.Will second method below will lead to memory leaks?
And
Which method of attaching events will perform better 1.Anonymous class instance 2.Separate class implementing interface