Reputation: 98
I want to set LWUIT TextField constraint to Number and Password. I make TextField by
TextField tf=new TextField();
tf.setConstraints(TextArea.NUMBER|TextField.PASSWORD);
tf.setInputModeOrder(new String[ ] {"123"} );
I use virtual keyboard for input to this textfield. When I press this textfiled, alphabat virtual keyboard appear and can type alphabat like a to z and other symbol.
How can I set this textfield that only appear numeric virtual keyboard?
Upvotes: 0
Views: 1057
Reputation: 14463
Use like this for both numeric and password in the TextField
,
textField.setConstraint(TextArea.NUMERIC | TextField.PASSWORD);
textField.setInputModeOrder(new String[]{"123"});
Upvotes: 1