In my J2ME app, i want to add a play command when got focus on choicegroup control named as tones & after lost focus on choicegroup control the command should be remove. How should I done this.... any idea, any hint or code is welcome....
In my J2ME app, i want to add a play command when got focus on choicegroup control named as tones & after lost focus on choicegroup control the command should be remove. How should I done this.... any idea, any hint or code is welcome....
Last edited by Rahul More; 2013-01-06 at 17:58.
You can simply add a focus listener on choicegroup , and handle your funtionality in focusgained() and focuslost() methods of focus listener...
Regards,
Harsha
If you are developing your application using the high level ui , then there are no methods to determine as such the choicegroup is fouccesd or not .
In this case you can have a default command set to the choicegroup such that the command will be added to the softkeys whenever
the choice group is foccussed
//
choiceGroup.setDefaultCommand(someCommand);
//
try out this it will solve your problem
Regards,
Venkatesh
Try using some UI toolkit like LWUIT - then you can do it with their choicegroup - by capturing the focus movement from 1 item to another....