I have an app where you input numbers (a lot) and it gets hard that the keyboard is also letters, I would like it to be just numbers (0-9), and a dot. Is there any way to do this using Kivy's .kv file and Python? I have tried input_type: 'number'
in the .kv file, but I couldn't get it to work. Thanks!
Edit: I have also tried using bubbles, no luck. Although, it would be nice to have a bubble number pad if possible.
Edit 2: I have put another bounty on this question because when I put the VKeyboard on a physical device (along with a popup) it breaks. In specific, the VKeyboard wont show up (and it also crashes after going to another TextInput field) and my popup doesn't scale correctly. My logcat is shown below.
10-21 08:30:23.944 11210 11233 I python : [INFO ] [Logger ] Record log in /data/user/0/org.test.bfcalc5/files/app/.kivy/logs/kivy_20-10-21_3.txt
10-21 08:30:23.944 11210 11233 I python : [INFO ] [Kivy ] v1.11.1
10-21 08:30:23.945 11210 11233 I python : [INFO ] [Kivy ] Installed at "/data/user/0/org.test.bfcalc5/files/app/_python_bundle/site-packages/kivy/__init__.pyc"
10-21 08:30:23.946 11210 11233 I python : [INFO ] [Python ] v3.8.1 (default, Oct 18 2020, 14:08:48)
10-21 08:30:23.946 11210 11233 I python : [Clang 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
10-21 08:30:23.946 11210 11233 I python : [INFO ] [Python ] Interpreter at ""
10-21 08:30:25.540 11210 11233 I python : [INFO ] [Factory ] 184 symbols loaded
10-21 08:30:26.210 11210 11233 I python : [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
10-21 08:30:26.289 11210 11233 I python : [INFO ] [Text ] Provider: sdl2
10-21 08:30:26.387 11210 11233 I python : [INFO ] [Window ] Provider: sdl2
10-21 08:30:26.437 11210 11233 I python : [INFO ] [GL ] Using the "OpenGL ES 2" graphics system
10-21 08:30:26.439 11210 11233 I python : [INFO ] [GL ] Backend used <sdl2>
10-21 08:30:26.440 11210 11233 I python : [INFO ] [GL ] OpenGL version <b'OpenGL ES 3.2 build 1.10@5187610'>
10-21 08:30:26.440 11210 11233 I python : [INFO ] [GL ] OpenGL vendor <b'Imagination Technologies'>
10-21 08:30:26.441 11210 11233 I python : [INFO ] [GL ] OpenGL renderer <b'PowerVR Rogue GE8322'>
10-21 08:30:26.442 11210 11233 I python : [INFO ] [GL ] OpenGL parsed version: 3, 2
10-21 08:30:26.442 11210 11233 I python : [INFO ] [GL ] Texture max size <4096>
10-21 08:30:26.443 11210 11233 I python : [INFO ] [GL ] Texture max units <16>
10-21 08:30:26.482 11210 11233 I python : [INFO ] [Window ] auto add sdl2 input provider
10-21 08:30:26.484 11210 11233 I python : [INFO ] [Window ] virtual keyboard allowed, single mode, docked
10-21 08:30:26.756 11210 11233 I python : [INFO ] [GL ] NPOT texture support is available
10-21 08:30:26.818 11210 11233 I python : [WARNING] [Base ] Unknown <android> provider
10-21 08:30:26.819 11210 11233 I python : [INFO ] [Base ] Start application main loop
10-21 08:30:26.938 11210 11233 I python : [WARNING] [GL ] Unpack subimage support is not available
10-21 08:30:33.249 11210 11233 I python : [INFO ] [Base ] Leaving application in progress...
10-21 08:30:33.250 11210 11233 I python : Traceback (most recent call last):
10-21 08:30:33.250 11210 11233 I python : File "/home/ubuntu/BFCalcApp/.buildozer/android/app/main.py", line 88, in <module>
10-21 08:30:33.251 11210 11233 I python : File "/home/ubuntu/BFCalcApp/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/bfcalc5/kivy/app.py", line 855, in run
10-21 08:30:33.253 11210 11233 I python : File "/home/ubuntu/BFCalcApp/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/bfcalc5/kivy/base.py", line 504, in runTouchApp
10-21 08:30:33.255 11210 11233 I python : File "/home/ubuntu/BFCalcApp/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/bfcalc5/kivy/core/window/window_sdl2.py", line 747, in mainloop
10-21 08:30:33.257 11210 11233 I python : File "/home/ubuntu/BFCalcApp/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/bfcalc5/kivy/core/window/window_sdl2.py", line 479, in _mainloop
10-21 08:30:33.258 11210 11233 I python : File "/home/ubuntu/BFCalcApp/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/bfcalc5/kivy/base.py", line 339, in idle
10-21 08:30:33.259 11210 11233 I python : File "/home/ubuntu/BFCalcApp/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/bfcalc5/kivy/clock.py", line 591, in tick
10-21 08:30:33.260 11210 11233 I python : File "kivy/_clock.pyx", line 384, in kivy._clock.CyClockBase._process_events
10-21 08:30:33.261 11210 11233 I python : File "kivy/_clock.pyx", line 414, in kivy._clock.CyClockBase._process_events
10-21 08:30:33.261 11210 11233 I python : File "kivy/_clock.pyx", line 412, in kivy._clock.CyClockBase._process_events
10-21 08:30:33.262 11210 11233 I python : File "kivy/_clock.pyx", line 154, in kivy._clock.ClockEvent.tick
10-21 08:30:33.263 11210 11233 I python : File "kivy/_clock.pyx", line 86, in kivy._clock.ClockEvent.get_callback
10-21 08:30:33.264 11210 11233 I python : File "/home/ubuntu/BFCalcApp/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/bfcalc5/kivy/weakmethod.py", line 56, in is_dead
10-21 08:30:33.265 11210 11233 I python : ReferenceError: weakly-referenced object no longer exists
10-21 08:30:33.266 11210 11233 I python : Python for android ended.
from Is there a way to show a number pad (preferably with a bubble) in a TextInput field using Kivy and Python? NEW ISSUE WITH CODE
No comments:
Post a Comment