(CharSequence source, int start, int end, Spanned dest, int dstart, int dend)
| 78 | // The input filters |
| 79 | InputFilter filter = new InputFilter() { |
| 80 | @Override |
| 81 | public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { |
| 82 | for (int i = start; i < end; ++i) { |
| 83 | if (!Pattern.compile("[0-9\\-]*").matcher(String.valueOf(source)).matches()) { |
| 84 | return ""; |
| 85 | } |
| 86 | } |
| 87 | return null; |
| 88 | } |
| 89 | }; |
| 90 | // Setting the filters |
| 91 | setFilters(new InputFilter[]{filter, new InputFilter.LengthFilter(19)}); |
nothing calls this directly
no outgoing calls
no test coverage detected