0
I’m playing an application that needs to enter numbers to make the necessary calculations, but I would like when the user selects Text Field to see the alphabetic keyboard appear, the numeric keyboard appears. How to implement this function?
0
I’m playing an application that needs to enter numbers to make the necessary calculations, but I would like when the user selects Text Field to see the alphabetic keyboard appear, the numeric keyboard appears. How to implement this function?
4
Just 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:
0
It’s very easy, just 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 an application user Sketchware
Browser other questions tagged android
You are not signed in. Login or sign up in order to post.
Perfect. It worked here, I implemented via XML even to not give confusion to me later. Thanks.
– Kingofwell
You are welcome, @King. If desired, mark as solved. Hugs!
– itscorey