How to make the Text Fields use the numeric android keyboard instead of the normal keyboard with all the letters? NOTE: I'm using KivyMD MDTextFields So when I click to write in the text fields a keyboard like this appears instead:
Asked
Active
Viewed 553 times
0
-
It seems the numeric keyboard from android is able to be used in kivy but I will review more information about it, right now this link may help https://github.com/kivy/kivy/issues/7545 – Oct 11 '21 at 00:07
-
Please provide enough code so others can better understand or reproduce the problem. – Community Oct 13 '21 at 04:18
2 Answers
0
I was having this same problem, I found an article where it said to use the input_type: 'number'
inside your MDTextField that opens the android numeric keypad! I'm compiling my code again to see if it checks. Ex.:
MDTextField:
id: quantidade
pos_hint: {"center_x": .5, "center_y": .5}
input_type: 'number'
hint_text: "Qtd."
helper_text_mode: "on_error"
helper_text: 'Insira uma quantidade (Apenas Números, "," e ".")'

patrick.genova
- 11
- 2
0
In the py file I created my own class for custom keyboard:
class CustomTextField(MDTextField):
def __init__(self, *args, **kwargs):
self.input_type = "number"
self.input_type = "tel"
self.input_filter = 'float'
self.multiline = False
super().__init__(**kwargs)
And then in the buildozer.spec file I changed the line:
p4a.branch = master
to:
p4a.branch = develop

Code Clickers
- 85
- 1
- 10