Added in API level 1
Deprecated in API level 30

LoginFilter

abstract class LoginFilter : InputFilter
kotlin.Any
   ↳ android.text.LoginFilter

Abstract class for filtering login-related text (user names and passwords)

Summary

Nested classes
open

This filter is compatible with GMail passwords which restricts characters to the Latin-1 (ISO8859-1) char set.

open

This filter rejects characters in the user name that are not compatible with GMail account creation.

open

This filter rejects characters in the user name that are not compatible with Google login.

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

This method is called when the buffer is going to replace the range dstart … dend of dest with the new text from the range start … end of source.

abstract Boolean

Returns whether or not we allow character c.

open Unit

Called whenever we encounter an invalid character.

open Unit

Called when we start processing filter.

open Unit

Called when we're done processing filter

Public methods

filter

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

Deprecated: Deprecated in Java.

This method is called when the buffer is going to replace the range dstart … dend of dest with the new text from the range start … end of source. Returns the CharSequence that we want placed there instead, including an empty string if appropriate, or null to accept the original replacement. Be careful to not to reject 0-length replacements, as this is what happens when you delete text.

isAllowed

Added in API level 1
abstract fun isAllowed(c: Char): Boolean

Deprecated: Deprecated in Java.

Returns whether or not we allow character c. Subclasses must override this method.

onInvalidCharacter

Added in API level 1
open fun onInvalidCharacter(c: Char): Unit

Deprecated: Deprecated in Java.

Called whenever we encounter an invalid character.

Parameters
c Char: the invalid character

onStart

Added in API level 1
open fun onStart(): Unit

Deprecated: Deprecated in Java.

Called when we start processing filter.

onStop

Added in API level 1
open fun onStop(): Unit

Deprecated: Deprecated in Java.

Called when we're done processing filter