Re: [kivy-users] numeric keyboard for use on android

1,149 views
Skip to first unread message

qua-non non

unread,
Feb 4, 2014, 10:21:44 PM2/4/14
to kivy-...@googlegroups.com
1) set TextInput_instance.input_type to 'numeric' or 


On Wed, Feb 5, 2014 at 5:46 AM, Padraic Cunningham <pcunni...@gmail.com> wrote:
what is the  simplest way to add a custom numeric keyboard for use on android?

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

ZenCODE

unread,
Feb 5, 2014, 11:56:13 AM2/5/14
to kivy-...@googlegroups.com
Hi there

Just in case it helps, I struggled here too. Although the "input_type" in the 1.8.0 TextInput will probably do the job for you, here is an example of how to implement a raw custom keyboard...

https://github.com/Zen-CODE/kivybits/tree/master/Keyboard
 
I found the docs here pretty unhelpful, and I plan on updating them once I neaten up this example and get a better understanding...

Cheers

Padraic Cunningham

unread,
Feb 6, 2014, 7:30:20 PM2/6/14
to kivy-...@googlegroups.com
Thanks, Zen-code, I did actually use the input_type and it still opened a text based layout, I am using the system keyboard as I need the Hardware.hideKeyboard() as the keyboard was not disappearing after the app loaded the output to the screen, and when I used the vkeyboard, it was tiny and would not change orientation when the phone did.

qua-non non

unread,
Feb 6, 2014, 7:35:10 PM2/6/14
to kivy-...@googlegroups.com
So you set input_type http://kivy.org/docs/api-kivy.uix.textinput.html#kivy.uix.textinput.TextInput.input_type
and the kayboard shown is still alphanumeric?

Have you updated your py4a removed any old cached libs/dowloads?



--

Padraic Cunningham

unread,
Feb 6, 2014, 7:35:15 PM2/6/14
to kivy-...@googlegroups.com
Should it be "number" or "numeric", I used number as that is what the docs said to use: "input_type is an OptionsProperty and defaults to ‘text’. Can be one of ‘text’, ‘number’, ‘url’, ‘mail’, ‘datetime’, ‘tel’, ‘address’."

qua-non non

unread,
Feb 6, 2014, 7:36:29 PM2/6/14
to kivy-...@googlegroups.com
Yes it should be number.

qua-non non

unread,
Feb 6, 2014, 7:46:02 PM2/6/14
to kivy-...@googlegroups.com
Make sure you have removed the packages cache from your ~/buildozer/android/packages dir
and remove your app_dir/.buildozer.

This should force buildozer to rebuild your app using latest stable kivy.

Bet Regards

Padraic Cunningham

unread,
Feb 6, 2014, 7:50:03 PM2/6/14
to kivy-...@googlegroups.com
I installed 1.8.0 through the ppa using ubuntu, I don't think I removed the packages cache though from .buildozer, I will try that thanks.


You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/wERoswNj_UQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.

qua-non non

unread,
Feb 6, 2014, 7:57:22 PM2/6/14
to kivy-...@googlegroups.com
One easy way to check if your app was build using the feature is to test if your TextInput shows selection handles. This feature was added after the input_type settings was introduced.

Padraic Cunningham

unread,
Feb 6, 2014, 8:15:42 PM2/6/14
to kivy-...@googlegroups.com
Thanks, qua-non, it is working now.
Reply all
Reply to author
Forward
0 new messages