Reputation:
In my application the user needs to enter numbers. On the phone one always needs to press the alt key for numbers. How can I programmatically allow the user to enter numbers in the edit field without pressing the alt key? Please give an example.
Upvotes: 1
Views: 783
Reputation: 15313
try this.
BasicEditField bef = new BasicEditField(BasicEditField.FILTER_NUMERIC);
and if you want to set filter on the fly.
bef.setFilter(TextFilter.get(TextFilter.NUMERIC));
Upvotes: 1