Using Lwuit Version 1.5, Im having a problem using the Virtual Keyboard. Given a TextField with a Numeric constraint. The first character entered will go directly to the Textfield despite the constraint given.
I´ve found the sourceCode in actionCommand
on VirtualKeyboard.java
producing this issue;
case INSERT_CHAR:
Button btn = currentButton;
String text = btn.getText();
if (inputField.getText().length() == 0) {
inputField.setText(text);
inputField.setCursorPosition(text.length());
} else {
inputField.insertChars(text);
}
break;
As seen above the first character will never go through insertChars
and check for validity later.
Question is: I can't figure out why is this behavior implemented, Im afraid to break something I don't realize if I override that deleting the "if" part.
Anyone knows what the reason could be?
If anyone already have a Workarround for this issue please Id appreciate.