public class AllCapsTransformationMethod extends Object implements TransformationMethod2
Constructor and Description |
---|
AllCapsTransformationMethod(Context context) |
Modifier and Type | Method and Description |
---|---|
CharSequence |
getTransformation(CharSequence source,
View view)
Returns a CharSequence that is a transformation of the source text --
for example, replacing each character with a dot in a password field.
|
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.
|
void |
setLengthChangesAllowed(boolean allowLengthChanges)
Relax the contract of TransformationMethod to allow length changes,
or revert to the length-restricted behavior.
|
public AllCapsTransformationMethod(Context context)
public CharSequence getTransformation(CharSequence source, View view)
TransformationMethod
getTransformation
in interface TransformationMethod
public void onFocusChanged(View view, CharSequence sourceText, boolean focused, int direction, Rect previouslyFocusedRect)
TransformationMethod
onFocusChanged
in interface TransformationMethod
public void setLengthChangesAllowed(boolean allowLengthChanges)
TransformationMethod2
setLengthChangesAllowed
in interface TransformationMethod2
allowLengthChanges
- true to allow the transformation to change the length
of the input string.