Language

LoginFilter.Filter(String, Int32, Int32, ISpanned, Int32, Int32) Method

Definition

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.

public string? Filter(string? source, int start, int end, Android.Text.ISpanned? dest, int dstart, int dend);
member this.Filter : string * int * int * Android.Text.ISpanned * int * int -> string

Parameters

source
String

The string that contains the proposed replacement.

start
Int32

The first source character index in the proposed replacement.

end
Int32

The exclusive end index of the proposed source range.

dest
ISpanned

The current text in the destination buffer.

dstart
Int32

The first destination character offset being replaced.

dend
Int32

The exclusive end offset of the replaced destination range.

Returns

The replacement with rejected characters removed, or null to accept the original replacement unchanged.

Remarks

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.

Java documentation for android.text.LoginFilter.filter(java.lang.CharSequence, int, int, android.text.Spanned, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to