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. Can you help me to explain the comments about webkit?

The comments comes from android/framework/../webkit/LoadListener.cancel().

 * Cancel a request.
     * FIXME: This will only work if the request has yet to be handled. This
     * is in no way guarenteed if requests are served in a separate thread.
     * It also causes major problems if cancel is called during an
     * EventHandler's method call.

    public void cancel() {
        if (WebView.LOGV_ENABLED) {
            if (mRequestHandle == null) {
                Log.v(LOGTAG, "LoadListener.cancel(): no requestHandle");
            } else {
                Log.v(LOGTAG, "LoadListener.cancel()");
        if (mRequestHandle != null) {
            mRequestHandle = null;

        mCacheResult = null;
        mCancelled = true;


Any help? Thanks a lot.

Best Regards,



2. Android Show Stoppers

Welcome to the world of smart phones. The only way to get around the
monthly charges is to get an unlocked device and run it strictly off
of WiFi. While not optimal, it is an option.

I think everyone is going to get used to the data charges, it's going
to be a fact of life with these things. I use ATT and have a $15/month
data plan, along with voice that works just fine with an unlocked

You have a choice, get a subsidized device for $100/200 and pay $30+ a
month over the voice plan for 2 years or get an unlocked device and
play it by ear.

-John Coryat


3. Is it possible to convert my T-mobile G1 into dev phone?

4. Downloading drm protected files.

5. about dispatchTouchEvent issue

6. Info Huawei 8800 WTA : Samsung Galaxy Spica atau Huawei U8220

7. How could adb identify many devices with same serial number?