added assertion

This commit is contained in:
Elena Bobkova 2017-03-06 20:29:56 +03:00
parent 08c3e73a28
commit 78b244897f
1 changed files with 2 additions and 0 deletions

View File

@ -309,6 +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;
}