set Phone type

This commit is contained in:
Elena Bobkova 2017-03-06 20:25:02 +03:00
parent cbaf06ca3d
commit 08c3e73a28
1 changed files with 3 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.AppCompatEditText;
import android.text.Editable;
import android.text.InputType;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.method.SingleLineTransformationMethod;
@ -308,8 +309,8 @@ public class TypefacedEditText extends AppCompatEditText {
@Override
public void setInputType(final int type) {
if (AttributesUtils.isNumberInputType(type)) {
Lc.assertion(new IllegalStateException(AttributesUtils.viewError(this,
"Do not specify number InputType for EditText, use phone instead")));
super.setInputType(InputType.TYPE_CLASS_PHONE);
return;
}
super.setInputType(type);
}