Untuk mempertahankan filter input asli, Anda dapat melakukannya dengan cara ini:
InputFilter.LengthFilter maxLengthFilter = new InputFilter.LengthFilter(100);
InputFilter[] origin = contentEt.getFilters();
InputFilter[] newFilters;
if (origin != null && origin.length > 0) {
newFilters = new InputFilter[origin.length + 1];
System.arraycopy(origin, 0, newFilters, 0, origin.length);
newFilters[origin.length] = maxLengthFilter;
} else {
newFilters = new InputFilter[]{maxLengthFilter};
}
contentEt.setFilters(newFilters);