03-08-2011 05:59 AM
hi
I am developing an app in which i want to use a checkBox and other button.But on click on the checkbox
did not responde when i override the navigation click for the button(other used in the app on that screen)
how to fix it.
CheckboxField myCheckbox = new CheckboxField("First checkbox", true);
LabelField lf = new LabelField("Hello World!", Field.FIELD_HCENTER);
Middle cfm=new Middle(2);
cfm.add(lf);
add(myCheckbox);
add(cfm);
protected boolean navigationClick(int status, int time) {
return true;
}
Any help
03-09-2011 06:14 PM
You appear to have overridden navigationClick for the screen (i.e. all Fields on the Screen) rather than just for the button. Put a break point in your navigationClick and see if it is invoked when you click on the CheckboxField.
In fact there should be no need to override navigationClick for the Button - you should listen for a Button 'click' event using a fieldChangedListener.