public abstract class ReplacementTransformationMethod extends Object implements TransformationMethod
getOriginal()
array to be replaced by the corresponding characters in the
getReplacement()
array.Constructor and Description |
---|
ReplacementTransformationMethod() |
Modifier and Type | Method and Description |
---|---|
protected abstract char[] |
getOriginal()
Returns the list of characters that are to be replaced by other
characters when displayed.
|
protected abstract char[] |
getReplacement()
Returns a parallel array of replacement characters for the ones
that are to be replaced.
|
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 abstract char[] getOriginal()
protected abstract char[] getReplacement()
public CharSequence getTransformation(CharSequence source, View v)
getOriginal()
replaced by ones from getReplacement()
.getTransformation
in interface TransformationMethod
public void onFocusChanged(View view, CharSequence sourceText, boolean focused, int direction, Rect previouslyFocusedRect)
TransformationMethod
onFocusChanged
in interface TransformationMethod