In my开发者_如何学C 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.
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));
精彩评论