开发者

How to initialize the onscreenkeyboard on the number view?

Hey, I'm making an app where users should sometimes write numbers.

Is there a w开发者_如何学编程ay to display the number view of the onscreen keyboard right away? So the user won't right "hundred" instead of "100"?

Thank you very much


android:numeric="integer"

use this in your edittext ...

you can also use decimal , signed

for more details http://androidblogger.blogspot.com/2009/01/numeric-edittext-and-edittext-with-max.html


Check the InputType attribute of the EditText class. You can set it to number so the user can only insert numbers to the EditText. In this case the keyboard should automatically show the number view.


I think you want to set the TextView inputType: http://developer.android.com/reference/android/widget/TextView.html#setInputType%28int%29 .

An example specifically of asking for a number pad is at http://android-er.blogspot.com/2010/07/some-examples-of-inputtype-on-edittext.html


Put the Below code in to Edittext view. . . .

android:numeric="integer"
android:phoneNumber="true"

if this tips helps u then vote me. . .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜