sinkuri256 / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

dialogGetInput should call up numeric soft keyboard when number input is expected #541

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'd like to see dialogGetInput automatically call up the soft keyboard in 
number mode, not alphabet mode, when a program needs numeric input.

Here's how this came up. I am a pediatrician.  Our hospital uses metric 
measurements of babies, 
in grams, instead of pounds and ounces. Every day a mother will ask me 
to convert from grams to pounds and ounces.  I realize there are a 
gazillion programs out there to convert kilos or grams to pounds.  The 
ones I see report the result as something like "7.5 pounds" instead of 
what mothers seem to want to hear, that is, 7 pounds 8 ounces. With my 
meager programming talent, I was able to write a python script to do 
what I want.  The program prompts me to enter the infant's weight in 
grams, and converts it to the pounds and ounces format I want.  It 
works fine. 
The glitch is, the when I use dialogGetInput to enter the infant's 
weight in grams, it brings up a software keyboard in alphabet mode. I 
have to press the keyboard shift into number mode. 
I know this is a trivial application, and a trivial problem for you 
professional programmers.  But, can you tell me how I can call up the 
keyboard in a mode ready to accept number input?

Original issue reported on code.google.com by DrMikeGa...@gmail.com on 16 Apr 2011 at 12:47