kehnar
kehnar

Reputation: 1387

how to make edit field accept number up to two decimal value in blackberry

I want to accept a number in edit Field up to two decimal value(for example 123.34).I am using new EditField(EditField.FILTER_REAL_NUMERIC); and new EditField(EditField.FILTER_INTEGER);

How can i do this

thank you

Upvotes: 2

Views: 485

Answers (1)

user784540
user784540

Reputation:

Extend NumericTextFilter class and override validate() method to conform your rules. And set the customized filter instance to your field via setFilter() method.

Upvotes: 2

Related Questions