Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public abstract class

ReplacementTransformationMethod

extends Object
implements TransformationMethod
java.lang.Object
   ↳ android.text.method.ReplacementTransformationMethod
Known Direct Subclasses

Class Overview

This transformation method causes the characters in the getOriginal() array to be replaced by the corresponding characters in the getReplacement() array.

Summary

Public Constructors
ReplacementTransformationMethod ()
Public Methods
CharSequence getTransformation ( CharSequence source, View v)
Returns a CharSequence that will mirror the contents of the source CharSequence but with the characters in getOriginal() replaced by ones from getReplacement() .
void onFocusChanged ( View view, CharSequence sourceText, boolean focused, int direction, Rect previouslyFocusedRect)
This method is called when the TextView that uses this TransformationMethod gains or loses focus.
Protected Methods
abstract char[] getOriginal ()
Returns the list of characters that are to be replaced by other characters when displayed.
abstract char[] getReplacement ()
Returns a parallel array of replacement characters for the ones that are to be replaced.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.text.method.TransformationMethod

Public Constructors

public ReplacementTransformationMethod ()

Added in API level 1

Public Methods

public CharSequence getTransformation ( CharSequence source, View v)

Added in API level 1

Returns a CharSequence that will mirror the contents of the source CharSequence but with the characters in getOriginal() replaced by ones from getReplacement() .

public void onFocusChanged ( View view, CharSequence sourceText, boolean focused, int direction, Rect previouslyFocusedRect)

Added in API level 1

This method is called when the TextView that uses this TransformationMethod gains or loses focus.

Protected Methods

protected abstract char[] getOriginal ()

Added in API level 1

Returns the list of characters that are to be replaced by other characters when displayed.

protected abstract char[] getReplacement ()

Added in API level 1

Returns a parallel array of replacement characters for the ones that are to be replaced.