Reputation:
my question is kinda related to this question: Numeric Soft Keyboard on Android
BUT, the question above isnt answered, so here i am.
Theres a EditText that when it gets touched or has focus, i want the Software Keyboard to show up by default as NUMERIC! Of course, you can switch back to ALPHANUMERIC, but i want to force it to show up as NUMERIC.
Thanks guys
Upvotes: 3
Views: 2502
Reputation: 200160
Use the android:inputType
XML attribute with the number
value:
<EditText android:id="@+id/edtInput"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:inputType="number"/>
Upvotes: 5