Gnana Prakash Gnana Prakash - 1 year ago 78
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.