0

This is my EditText xml code:

  <EditText
   android:layout_width="200dp"
   android:layout_height="wrap_content"
   android:inputType="number"/>

There are 20 EditText's in my xml. When I touch any of the EditText for the first time (after Activity is created), full keyboard (with letters) appears. Next time, when I touch some EditText numeric keboard appears (which is correct).

How to display numeric keyboard also when activity is created on first time and EditText is touched on first time?

FYI: I am using Android 5.1

Alexander Ciesielski
  • 10,506
  • 5
  • 45
  • 66
Martin Dusek
  • 1,170
  • 3
  • 16
  • 41

1 Answers1

0

Hope it will work

<EditText
android:digits="0123456789."
android:inputType="numberDecimal"
/>

OR

android:inputType="phone"
Aditya Vyas-Lakhan
  • 13,409
  • 16
  • 61
  • 96