I am working on an application that requires me to implement more than one click listener on a button. I am stuck. After some searching, I only came across a few hacks that can make this possible.
However in this case, some are not applicable since in my application, the logic is that if the button is clicked and the condition is met, then the second listener is called firing off another event.
This seems tricky. Does anyone have any ideas?
Thanks.
you can meet your requirement using this:
set a global variable say
int condition_number=0;then,
This way,you would be able to call different code snippets for different condition and repeatedly call them as you require without making conflict.
You can set a case to get out of the execution of this method by just putting break there.