max textlength editext android code example
Example: edit text maxLength android programmatically
et.setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxLength)});
et.setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxLength)});