Allow only decimal numeric input and use phone soft keyboard?

by Watter » Fri, 23 Apr 2010 08:03:48 GMT

Sponsored Links
 I am trying to do something that I thought would be simple, yet I
still haven't found the right approach.

I have a EditText field that should only accept unsigned decimal
entries. Using android:inputType="numberDecimal" in my layout xml file
achieves this, however the soft keyboard that is raised with this
inputType is the standard keyboard but just uses the alternate view
with the number row on top. This is far from ideal for a field that
only allows numbers. A much better soft keyboard for numeric entry is
the "phone" one. It has all of the numbers and a decimal. Perfect!!
Well, except that for the life of me I cannot figure out how to use
both the phone keyboard AND allow only numeric entry. I've tried
everything I can think of but if I use the phone soft keyboard then
the input field also allows things like "(" and any of the other
symbols available on that keyboard.

Is there any way to get the nice big numeric buttons of the phone
keyboard along with only allowing decimal entry?


Other Threads

1. Failed to install xxx.apk on device emulator

I am new to android development. I am writing "Hello World" program .
But when i run it the emulator loads after say 5-10 mins it will give
the following error  :

[2011-04-17 14:26:35 - HelloAndroid] Installing HelloAndroid.apk...
[2011-04-17 14:29:10 - HelloAndroid] Failed to install
HelloAndroid.apk on device 'emulator-5554!
[2011-04-17 14:29:10 - HelloAndroid] (null)
[2011-04-17 14:29:13 - HelloAndroid] Launch canceled!

i tried looking into android troubleshooting tips in official android
website. But those steps didnt help

can anybody plz help me in this.


2. Another tablet from Cisco

Omg, cisco kena demam android juga....

sent from my cool z


3. Paket TURBO Tsel Flash

4. Google Maps MapView bug?

5. Map view ballons - Updating time

6. Kapan froyo resmi untuk Samsung Galaxy 5?

7. How to find bandwidth usage by different activity