Class of android.text, in InputFilter · InputFilter.java · Android's reference
public static class LengthFilter implements InputFilter
Keeps the text at most a number of chars long, and does not split a surrogate pair.
public LengthFilter(int max) sourcepublic int getMax() sourcepublic CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) sourceMade from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.