Implement Numeric Keypad

0

I'm moving on an application that needs to enter numbers to do the necessary calculations, but I'd like it when the user selects Text Field to see if the alphabetic keyboard appears, the numeric keypad appears. How do you implement this function?

    
asked by anonymous 22.03.2015 / 23:42

2 answers

4

You only configure the input type of your EditText in the XML file.

<EditText android:inputType="number"/>

Or if you prefer, you can do this by Java itself:

myEditText.setInputType(InputType.TYPE_CLASS_NUMBER);

Links that may be useful to you:

22.03.2015 / 23:51
0

It is very easy, you only need to configure the input type of your EditText in the XML file.

<EditText android:inputType="number"/>

Or in Java:

edittext1.setInputType(InputType.TYPE_CLASS_NUMBER);

If you are a user of the Sketchware application

    
19.12.2018 / 16:17