title: Android EditText - Input with numbers only
body: <p>I created an EditText that only allows numbers as an input. It's a very simple EditText with nothing special:</p>
  <pre><code>&lt;EditText
          android:id=&quot;@+id/editTextAmount&quot;
          android:layout_marginTop=&quot;10dp&quot;
          android:layout_width=&quot;100dp&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:background=&quot;@color/colorWhite&quot;
          android:inputType=&quot;text&quot;
          android:digits=&quot;0123456789&quot;
          /&gt;
  </code></pre>
  <p>I tried it on a few devices and it's working as expected, I can enter only numbers. The issue arise when using a Samsung Galaxy Note S10+ (with a Samsung keyboard, I think the issue comes from there). With that device when I focus the EditText the keyboard opens (with only number visible) but when I type something in the field nothing happens. I can press any key from the keyboard (enter key, numbers, ...) nothing changes.</p>
  <p>I tried to change the input type programmatically in the activity, I tried to fiddle with the inputType (numberDecimal, numberSigned, both, ...) in any case it is simply not working. The interesting thing is that if I change the inputType to &quot;text&quot; and remove the digits restriction then it is working perfectly.</p>
  <p>My question is: How can I limit the EditText input to numbers with a Samsung Galaxy Note S10+?</p>
  <p>EDIT: Just to make it perfectly clear, I am asking this for a specific device! I already tried:</p>
  <pre><code>android:inputType=&quot;number&quot;
  </code></pre>
  <p>And</p>
  <pre><code>editText.setInputType(InputType.TYPE_CLASS_NUMBER);
  </code></pre>
  <p>And
  any variation of those (numberDecimal, numberSigned, ...)</p>