Android Numeric Keypad on Emulator

You must Login before you can answer or comment on any questions.

How can you get a standard keypad on Android; none of the UI.Keyboard work ![standard keypad] (d:/Numeric_pad.jpg "Standard Keypad") ![Android keypad} (d:/Numeric+pad_Android.jpg "Android Keypad")

1 Answer

Hi

You can get a numeric keypad in Android as below;

var txt1 = Ti.UI.createTextField({
    keyboardType: Ti.UI.KEYBOARD_DECIMAL_PAD,
    height: 60,
    left: 10,
    top: 10,
    value: '123',
    width: 150
});
win.add(txt1);
The following four constants appear to show the exact same appearance.
keyboardType: Ti.UI.KEYBOARD_DECIMAL_PAD,
keyboardType: Ti.UI.KEYBOARD_NUMBER_PAD,
keyboardType: Ti.UI.KEYBOARD_PHONE_PAD,
keyboardType: Ti.UI.KEYBOARD_NUMBERS_PUNCTUATION,
There appears to be no ability show ONLY numbers and each of the choices below have multiple extra symbols not associated with pure numeric values either - with each showing phone related additions.

Shame as this seems like an oversight somewhere.

— answered 1 year ago by Malcolm Hollingsworth
answer permalink
3 Comments
  • none of hese options do show "/" or "." on Ti 2.1.0 with the Android sdk 2.3.3 that is on a numeric KB

    — commented 1 year ago by John Mohan

  • The previous Android sdk had a Samsung api for the keyboard that included these symbols; the latest version of Adroid sdkdoes contain that anymore

    — commented 1 year ago by John Mohan

  • I am not near my dev machine at the moment, but I am sure my emulator did, I will put up some screenshots as soon as I am back in front of it.

    — commented 1 year ago by Malcolm Hollingsworth

Your Answer

Think you can help? Login to answer this question!