On the internet to see a lot of digital keyboard, in the input user account, the direct soft keyboard appears digital keyboard, but a lot of code some will be less a word, it is not good to use, the use of their own and correct paste over, see Code
in XML
<edittext
android:inputtype= "number"
Android :d igits= "1234567890"
android:id= "@+id/username_edit"
android:background= "@mipmap/userbg"
android:layout_width= "fill_parent"
android:layout_height= "wrap_content"
android:layout_alignbottom= @+id/user_img "
android:layout_torightof=" @+id/user_img "
android:layout_aligntop= "@+id/user_img"
android:layout_marginright= "40DP"
android:gravity= "center"
android:singleline= "true"
android:textcursordrawable= "@drawable/cursor"
/>
Other content can set itself, android:inputtype= "number"
Android:digits= "1234567890"
This attribute must have
Java code
Username.setinputtype (Editorinfo.type_class_phone);//Set up numeric keypad display
Of course, if you want to display numbers here, in the case of English, you can set android:digits= "1234567890".