FileDocCategorySizeDatePackage
AllCapsTransformationMethod.javaAPI DocAndroid 5.1 API1827Thu Mar 12 22:22:10 GMT 2015android.text.method

AllCapsTransformationMethod

public class AllCapsTransformationMethod extends Object implements TransformationMethod2
Transforms source text into an ALL CAPS string, locale-aware.
hide

Fields Summary
private static final String
TAG
private boolean
mEnabled
private Locale
mLocale
Constructors Summary
public AllCapsTransformationMethod(android.content.Context context)


       
        mLocale = context.getResources().getConfiguration().locale;
    
Methods Summary
public java.lang.CharSequencegetTransformation(java.lang.CharSequence source, android.view.View view)

        if (mEnabled) {
            return source != null ? source.toString().toUpperCase(mLocale) : null;
        }
        Log.w(TAG, "Caller did not enable length changes; not transforming text");
        return source;
    
public voidonFocusChanged(android.view.View view, java.lang.CharSequence sourceText, boolean focused, int direction, android.graphics.Rect previouslyFocusedRect)

    
public voidsetLengthChangesAllowed(boolean allowLengthChanges)

        mEnabled = allowLengthChanges;