3

I am using MaterialEditText library. Though I tried removing the MaterialEditText library and using normal EditText also doesn't work.

The issue is When I try to put inputType="textPassword" or inputType="number" or inputType="numberDecimal" my editText doesnt take number as input.

I tried with multiple phones. What I got to know it works correctly in SAMSUNG phones and not in other phones.

AM I missing something?

<com.rengwuxian.materialedittext.MaterialEditText
                android:id="@+id/mobile_number"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/activity_horizontal_margin"
                android:layout_marginStart="@dimen/activity_horizontal_margin"
                android:hint="@string/mobile_number"
                android:inputType="numberDecimal"
                android:textSize="@dimen/font_size_sub_normal"
                app:met_clearButton="true"
                app:met_floatingLabel="normal"
                app:met_floatingLabelTextColor="@color/colorPrimary" />

even if I use normal editText it doesn't work.

If I remove InputType than it works.

EDIT : I just found that issue is with Google Keyboard. Everything works fine with samsung keyboard but inputType with Google Keyboard not working. Not working in the sense it is not taking numbers

ankuranurag2
  • 2,300
  • 15
  • 30
CodeGeek
  • 677
  • 2
  • 8
  • 22

1 Answers1

0

Try to use solution provided by google (support library) EditText with TextInputlayout

Lebedevsd
  • 950
  • 5
  • 12