Gnana Prakash Gnana Prakash - 1 year ago 111
Android Question

android keyboard showing numbers

I am trying to show the android keyboard which shows only numbers and a decimal point it works fine in devices like Lenovo but it doesn't works in devices like Samsung. But when i installed an app the keyboard works same in both the above mentioned devices.
I would like to know whether it is a custom keyboard or not.Even i have tried adding the code for the keyboard:


but it didn't works.I would like to know how to get the same keyboard as mentioned in the below image which works in all devices.
enter image description here

Answer Source

Try this

By Xml


By Java

input.setInputType(InputType.TYPE_CLASS_NUMBER);      //OR    

This may helps you.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download