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. Problem with Vertical Scroll Bar *thumb* in WebView !!!

Hi Group,

I have Linear Layout in which I show web-view at top and 2 buttons at
the bottom. I load local HTML file from my asset folder and it
loads properly.

But it looks there is a some problem with the Vertical Scroll Bar
*THUMB*, which appears quite big as the HTML page loads. But the thumb
gets re-sized to its proper size when I press the down arrows key or
touch the screen to scroll down the page.

Does anybody encounter this problem before? What the wrong I am doing?
here?

Thanks,
Ajeet Singh

-- 

2. tanya ttg Ndrive

Mau tanya,utk aplikasi Ndrive bagaimana caranya kita set posisi kita
saat ini? dan klo statusnya waiting for a valid gps signal itu artinya
belum ke lock ya? apakah harus selalu di luar ruangan baru bisa ke
lock?

Regards
Edwin

-- 
"Indonesian Android Community [id-android]" 

3. To close the virtual keyboard

4. Alsa Audio Support? OMAP24xx cpu

5. Trying to achieve scale centerCrop with Activity windowBackground drawable

6. Call blocking application

7. DalvikVM Crashes on receiving untrusted client certificat