02-02-2012 09:15 AM
Hello All,
I have a screen which contains a list field and a set of navigation buttons on top. I have overridden the navigationClick method to handle the trackpad click/ touch events as shown in the method below:
protected boolean navigationClick(int status, int time) {
// TODO Auto-generated method stub
Dialog.inform("Clicked List");
return true;
}
When the list is clicked or touched the output is as below:
For the button i have used the setChangeListener as in the code below:
logoutButton.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field field, int context) {
// TODO Auto-generated method stub
Dialog.inform("Clicked Button");
}
});
Now when the focus is on the button and i click on the button using the trackpad the navigationClick method gets invoked and not the fieldChanged method. The output is as below:
Am i missing out on something? When the button is clicked using the tracpad i would want the fieldChanged method to be invoked. Kindly help me with this. Thanks in advance.
Regards,
S.A.Norton Stanley
Solved! Go to Solution.
02-02-2012 09:20 AM
02-02-2012 09:58 AM
Hello Simon,
1. The button is created with CONSUME_CLICK. I tried removing this and the behaviour is still the same.
2. This is the behaviour on non touch devices too. However when the enter button is pressed the fieldChanged method gets invoked.
Thanking you,
Regards,
S.A.Norton Stanley
02-02-2012 10:10 AM
02-02-2012 11:11 AM
Hello Simon,
Thank you. As you rightly pointed out the issue was that i had overwritten navigationclick on the screen. After moving the navigationclick to the listfield my issue was solved. Thanks again. ![]()
Regards,
S.A.Norton Stanley