package com.marshalchen.common.uimodule.modifysys;
import android.content.Context;
import android.text.method.SingleLineTransformationMethod;
import android.view.View;
import android.widget.TextView;
import java.util.Locale;
class PagerTitleStripIcs {
public static void setSingleLineAllCaps(TextView text) {
text.setTransformationMethod(new SingleLineAllCapsTransform(text.getContext()));
}
private static class SingleLineAllCapsTransform extends SingleLineTransformationMethod {
private static final String TAG = "SingleLineAllCapsTransform";
private Locale mLocale;
public SingleLineAllCapsTransform(Context context) {
mLocale = context.getResources().getConfiguration().locale;
}
@Override
public CharSequence getTransformation(CharSequence source, View view) {
source = super.getTransformation(source, view);
return source != null ? source.toString().toUpperCase(mLocale) : null;
}
}
}