views:

1111

answers:

2

Is there a way in android to invoke a numeric only keypad, i.e. a virtual keypad that contains only the numbers 0 to 9 and a "." sign?

+5  A: 

Try doing android:inputType="phone" ?

Peter Boughton
+6  A: 

Basically, you need what Peter Boughton said.

More generally, if you need to invoke different type of keyboard, depending on the input you expect on your EditText component, you should use the IMF (Input Media Framework) and different IMEs (Input Media Editors).

You can customize not only the input symbols, but also the layout of the keyboard in your application, auto-completion and other options.

You may want to read this post in the Android Developers Blog: Updating Applications for On-screen Input Methods

Dimitar Dimitrov