public abstract class ReplacementTransformationMethod
extends Object
implements TransformationMethod
java.lang.Object | |
↳ | android.text.method.ReplacementTransformationMethod |
Known Direct Subclasses |
这种变换方法使得在字符 getOriginal()
阵列由在相应的字符来代替 getReplacement()
阵列。
Public constructors |
|
---|---|
ReplacementTransformationMethod() |
Public methods |
|
---|---|
CharSequence |
getTransformation(CharSequence source, View v) 返回一个CharSequence,它将镜像源CharSequence的内容,但将 |
void |
onFocusChanged(View view, CharSequence sourceText, boolean focused, int direction, Rect previouslyFocusedRect) 当使用此TransformationMethod的TextView获得或失去焦点时,将调用此方法。 |
Protected methods |
|
---|---|
abstract char[] |
getOriginal() 返回显示时将被其他字符替换的字符列表。 |
abstract char[] |
getReplacement() 为要替换的字符返回并行字符数组。 |
Inherited methods |
|
---|---|
From class java.lang.Object
|
|
From interface android.text.method.TransformationMethod
|
CharSequence getTransformation (CharSequence source, View v)
返回一个CharSequence,它将镜像源CharSequence的内容,但将 getOriginal()
的字符替换为 getReplacement()
。
Parameters | |
---|---|
source |
CharSequence
|
v |
View
|
Returns | |
---|---|
CharSequence |
void onFocusChanged (View view, CharSequence sourceText, boolean focused, int direction, Rect previouslyFocusedRect)
当使用此TransformationMethod的TextView获得或失去焦点时,将调用此方法。
Parameters | |
---|---|
view |
View
|
sourceText |
CharSequence
|
focused |
boolean
|
direction |
int
|
previouslyFocusedRect |
Rect
|