keyboardType
What are the possible values for keyboardType?
I was hoping that Titanium.UI.textField would have a reference to keyboardType in it as that’s what is used in the kitchensink demo. No.
I did a search for keyboardType in the mobile API reference and the only result is Titanium.UI.SearchBar which informatively suggests
"keyboardType int the keyboard type constant to use when the field is focused"… but doesn’t tell me what they are.
Kitchen sink shows a textfield using Titanium.UI.KEYBOARD_DEFAULT but I can't find that anywhere in the API
3 Answers
-
Thanks Kosso… though it should be noted that the KS example doesn’t include the EMAIL type (which I guessed)
and it seems extreme that someone needs to download the kitchen sink example just to find a textField keyboard property.If anyone is looking this is probably an incomplete list
keyboard typesTitanium.UI.KEYBOARD_DEFAULT
Titanium.UI.KEYBOARD_EMAIL
Titanium.UI.KEYBOARD_ASCII
Titanium.UI.KEYBOARD_URL
Titanium.UI.KEYBOARD_NUMBER_PAD
Titanium.UI.KEYBOARD_NUMBERS_PUNCTUATION
Titanium.UI.KEYBOARD_PHONE_PADsupported returnKeyTypes
Titanium.UI.RETURNKEY_DEFAULT
Titanium.UI.RETURNKEY_GO
Titanium.UI.RETURNKEY_GOOGLE
Titanium.UI.RETURNKEY_JOIN
Titanium.UI.RETURNKEY_NEXT
Titanium.UI.RETURNKEY_ROUTE
Titanium.UI.RETURNKEY_SEARCH
Titanium.UI.RETURNKEY_SEND
Titanium.UI.RETURNKEY_YAHOO
Titanium.UI.RETURNKEY_DONE
Titanium.UI.RETURNKEY_EMERGENCY_CALL -
In KitchenSink, the keyboard demos can be found in Controls > Text Field > Keyboard
;)
-
These used to be on the old codestrong site. The new docs section here is lacking quite a few constants