07-27-2009 02:54 AM
Hi all, i need your ideas to make my app more interactive.
I created a custom button, display an image instead of the native button. i extended it from the Field class. i used it in my CustomManager class. i write a clickevent in the manager class using fieldChanged(Field, int); i defined the navigationclick method ifrom which i pass fieldchangenotify(1); method in the custom butttonclass.
now the problem is, when i clicked on the manager the click event is catching... the click event is catching when i clicked on the custom button or the manager, and on teh other controls also. i need to catch the click of teh custom button only. how can i do that?? can i have any samples on it. i need to catch the clickevent of the custom button only.
have a nice time
07-27-2009 06:03 AM
Are you using the same listener with your button that u r using for all other controls? If yes then, you can either do a instanceof to check if the field is an instance of your custom button class, or you can also create a new Fieldchange listener specifically for your button.
Hope this solves your problem.