Thursday, April 22, 2010

[android-developers] Re: Allow only decimal numeric input and use phone soft keyboard?

From reading this:

http://developer.android.com/resources/articles/creating-input-method.html

it looks like you need TYPE_CLASS_NUMBER.

On Apr 21, 10:25 pm, Watter <matthewcwe...@gmail.com> wrote:
> 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?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate