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. Senayan City WTA Setting Nx1

Akhirnya boss AH juga yg turun tangan....hahahahahahahahah.

2010/1/15 Agus Hamonangan <>

> Click  

2. Android ADT update is failing.

I am trying to update my ADT from v0.9.4 to v0.9.5. But it fails with
an error:

An error occurred while collecting items to be installed
  No repository found containing:

Any idea what is wrong?

- Sanjay

3. Transmitting on 433Mhz

4. orientation of road

5. Reset on android

6. Problem with ADT for Eclipse

7. sd card storage state and detecting it being plugged in or not...