Added in API level 1

LengthFilter


open class LengthFilter : InputFilter
kotlin.Any
   ↳ android.text.InputFilter.LengthFilter

This filter will constrain edits not to make the length of the text greater than the specified length.

Summary

Public constructors

Public methods
open CharSequence!
filter(source: CharSequence!, start: Int, end: Int, dest: Spanned!, dstart: Int, dend: Int)

open Int

Public constructors

LengthFilter

Added in API level 1
LengthFilter(max: Int)

Public methods

filter

Added in API level 1
open fun filter(
    source: CharSequence!,
    start: Int,
    end: Int,
    dest: Spanned!,
    dstart: Int,
    dend: Int
): CharSequence!

getMax

Added in API level 21
open fun getMax(): Int
Return
Int the maximum length enforced by this input filter