/** * Use this method to uppercase all char in text. * * @param allCaps */ @SuppressLint("NewApi") @Override public void setAllCaps(boolean allCaps) { //FIXME: if user input new char, it's generate a crash on Paint methods if (this.isOldDeviceTextAllCaps()) { if (allCaps) { setTransformationMethod(new AllCapsTransformationMethod( getContext())); } else { setTransformationMethod(null); } } else { super.setAllCaps(allCaps); } }
public AutoCompleteEditText(Context context, AttributeSet attrs) { super(context, attrs); editTextVersion(); setDisableCopyAndPaste(context, attrs); setCancelClipboard(context, attrs); setAutoFocus(context, attrs); if (isOldDeviceTextAllCaps()) { setAllCaps(context, attrs); } }
public AutoCompleteEditText(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); editTextVersion(); setDisableCopyAndPaste(context, attrs); setCancelClipboard(context, attrs); setAutoFocus(context, attrs); if (isOldDeviceTextAllCaps()) { setAllCaps(context, attrs); } PixlUIfaceManager.applyFont(this, attrs, defStyle, context); }