Allow only decimal numeric input and use phone soft keyboard?

by Nmix » Fri, 23 Apr 2010 12:30:35 GMT


Sponsored Links
 Try adding the following line to the xml to filter for integer input:

android:digits="0123456789"

I've had some success using android:inputType to select the soft
keyboard and android:digits to filter which keys are accepted.



>



Allow only decimal numeric input and use phone soft keyboard?

by jamesc » Fri, 23 Apr 2010 13:44:00 GMT


 >From reading this:

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

it looks like you need TYPE_CLASS_NUMBER.



>


Sponsored Links


Other Threads

1. Modifying the wifi advanced setting via API

In "Settings" - "Wireless controls" - "Wi-Fi settings" - (menu button)
"Advanced" , we can modify the "IP settings", such as "Use static
IP" (DHCP on/off I guess), "IP address", "Gateway", "Netmask", "DNS
1/2".  I want to make a software to modify those values, to resolve
the Android issue 1215.
http://code.google.com/p/android/issues/detail?id=1215

However, after checking the android.net.wifi package, I cannot find
any way to modify those values.  I also unable to find any 3rd party
software, which is able to change those settings.

Is it impossible to change those advanced wi-fi setting in current
API?

--~--~---------~--~----~------------~-------~--~----~

2. Upgrade to Android 1.5 in Eclipse, but android library no longer recognized

Hi:

After I followed the steps necessary to upgrade to 1.5 SDK, I found
that eclipse no longer recognize the android libraries.  I "solved"
this via manually adding the android.jar to Java Build Path, but then
this creates the following problem:

[2009-05-31 22:59:04 - Tractor]
trouble processing "java/security/cert/CertPathParameters.class":
[2009-05-31 22:59:04 - Tractor]
Attempt to include a core VM class in something other than a core
library.
It is likely that you have attempted to include the core library from
a desktop
virtual machine into an application, which will most assuredly not
work. If
you really intend to build a core library -- which is only appropriate
as
part of creating a full virtual machine binary, as opposed to
compiling an
application -- then use the "--core-library" option to suppress this
error
message. If you go ahead and use "--core-library" but are in fact
building
an application, then please be aware that your build will still fail
at some
point; you will simply be denied the pleasure of reading this helpful
error
message.
[2009-05-31 22:59:04 - Tractor] 1 error; aborting
[2009-05-31 22:59:04 - Tractor] Conversion to Dalvik format failed
with error 1

Anybody has any advice on that?  Many thanks.

--~--~---------~--~----~------------~-------~--~----~

3. Testing among peers - A new group proposed

4. Disable 3G (UMTS) via code

5. How to listen for outside touch events for PopupWindow

6. Send files as MMS

7. building android for dream and for a new target