I want a keyboard with ONLY visible numbers to an EditText view. Without any other character.
I have tested with all available inputs and don't work. I have searched a way to get a keyboard only with numbers but I have only seen references to:
android: inputType = "numberPassword"
But I want visible numbers in EditText. Someone can help me?
I want a keyboard like that: (numberPassword)
I have tried with:
android:digits="0123456789"
android:inputType="phone"
and
android:inputType="number"
and appears like that:
In xml
edittext
:In program:
I think you used somehow the right way to show the number only on the keyboard so better try the given line with xml in your edit text and it will work perfectly so here the code is-
In case any doubt you can again ask to me i'll try to completely sort out your problem. Thanks
For the EditText if we specify,
only numbers can be got. But if you use,
along with the numbers it can accept special characters like ;,/". etc.
Place the below lines in your
<EditText>
:After several tries, I got it! I'm setting the keyboard values programmatically like that
Or if you want you go with the XML view is like:
Both configs gonna display a password bullets, and as far as we are looking display numbers on the EditText we need to create a custom ClickableSpan class.
And finally we need implementing it to the EditText in order to display the characters typed.
This is how my keyboard looks like now
I have tried every thing now try this one it shows other characters but you cant enter in the editText