Skip to content

Instantly share code, notes, and snippets.

View amcmobileware's full-sized avatar

AMC Mobileware amcmobileware

View GitHub Profile
public class DecimalDigitsInputFilter implements InputFilter {
private static String separators = "[\\.\\,]";
private final Pattern mPattern;
public DecimalDigitsInputFilter(int digitsBeforeSeparator, int digitsAfterSeparator) {
String b = "(-?\\d{1," + digitsBeforeSeparator + "})";
String a = "(\\d{1," + digitsAfterSeparator + "})";
String s = separators;