Build 1.0_r1(from source)

android.text.method
Class ReplacementTransformationMethod

java.lang.Object
  extended by android.text.method.ReplacementTransformationMethod
All Implemented Interfaces:
TransformationMethod
Direct Known Subclasses:
HideReturnsTransformationMethod, SingleLineTransformationMethod

public abstract class ReplacementTransformationMethod
extends Object
implements TransformationMethod

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


Constructor Summary
ReplacementTransformationMethod()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplacementTransformationMethod

public ReplacementTransformationMethod()
Method Detail

getOriginal

protected abstract char[] getOriginal()
Returns the list of characters that are to be replaced by other characters when displayed.


getReplacement

protected abstract char[] getReplacement()
Returns a parallel array of replacement characters for the ones that are to be replaced.


getTransformation

public 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().

Specified by:
getTransformation in interface TransformationMethod

onFocusChanged

public void onFocusChanged(View view,
                           CharSequence sourceText,
                           boolean focused,
                           int direction,
                           Rect previouslyFocusedRect)
Description copied from interface: TransformationMethod
This method is called when the TextView that uses this TransformationMethod gains or loses focus.

Specified by:
onFocusChanged in interface TransformationMethod

Build 1.0_r1(from source)

Please submit a feedback, bug or feature