now I have this:
public void focusChanged(Field field, int eventType) {
if ( field == txtAmount && eventType == 1)
{
getVirtualKeyboard().setVisibility(VirtualKeyboard.HIDE);
}
}
Now my problem is that the keyboard isn't hiding. I think the error is in the eventType parameter. What number identifies a LostFocus event? I hard coded in '1' for tests but it doesnt seem to work.
FocusChangeListener focusListener;
//In the constructor:
txtAmount = new EditField(Field.FIELD_RIGHT);
txtAmount.setFocusListener(focusListener);
public void focusChanged(Field field, int eventType) {
if ( field == txtAmount && eventType == 1)
{
Dialog.alert("iasdi");
getVirtualKeyboard().setVisibility(VirtualKeyboard.HIDE);
}
}
why isn't this working? is there an enum or something that i can use to choose what eventType I should react to?
Also, if I remove the event type (so that the code executed regardless of the action just when focus changes right? nothing happens the dialog I put in for show, doesn't display meaniing the event is never entered. Any suggestions?
thanks