How to enable numberpad in a Alert Dialog?
This code will not open load the number pad
var dialog = Ti.UI.createAlertDialog({
style : Titanium.UI.iPhone.AlertDialogStyle.SECURE_TEXT_INPUT,
message : 'Please Login',
maxLength : 4,
keyboardType : Ti.UI.KEYBOARD_NUMBER_PAD,
buttonNames : ['Logout', 'Login'],
title : 'Login'
});
The keyboardType
property is not supported by an alert dialog in Titanium. That is for a TextField only.
So you cant do this with Titanium, another approach would be to make a custom alert out of a Ti.UI.View with an embedded TextField.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.