开发者

Android on screen number pad

开发者 https://www.devze.com 2023-01-29 01:03 出处:网络
I wanted to take Numeric input from user from Numberpad displayed on screen, it should be in Activity view. please see attached image.

I wanted to take Numeric input from user from Numberpad displayed on screen, it should be in Activity view. please see attached image.

I don't know if there is some way to make simi开发者_如何学Clar UI or do i have make one my self in XML ? . need your help.

Android on screen number pad


You can indicate to the input method that you want numeric input:

EditText editText = ...;
editText.setInputType(InputType.TYPE_CLASS_NUMBER);

and then most of the input methods will give you an arrangement like the one above.

You can probably get a view exactly like the one you show by sending an intent with an action of com.android.phone.action.TOUCH_DIALER, but getting a result back is likely to be somewhere between difficult and impossible.

You may want to take some inspiration from https://android.googlesource.com/platform/packages/apps/Contacts/+/froyo/src/com/android/contacts/TwelveKeyDialer.java

0

精彩评论

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