TextField
Text field in an alert.
Use the text field to customize the appearance of the text entered into it.
You do not create create instances of this. Instead you should add a text field to an Alert using the addTextField() and addSecureTextField() on the alert.
Properties
Section titled “Properties”Font of the text.
font: FontisSecure
Section titled “isSecure”Hides the text that is entered when set to true.
isSecure: boolThe default value is false.
placeholder
Section titled “placeholder”Placeholder shown in the text field while it is empty.
placeholder: stringText in the text field.
text: stringtextColor
Section titled “textColor”Color of the text.
textColor: ColorMethods
Section titled “Methods”
centerAlignText()
Section titled “centerAlignText()”Center aligns the text.
centerAlignText()
leftAlignText()
Section titled “leftAlignText()”Left aligns the text.
leftAlignText()This is the default text alignment.
rightAlignText()
Section titled “rightAlignText()”Right aligns the text.
rightAlignText()
setDecimalPadKeyboard()
Section titled “setDecimalPadKeyboard()”Use a numeric keyboard with a decimal point for entering text.
setDecimalPadKeyboard()
setDefaultKeyboard()
Section titled “setDefaultKeyboard()”Use the default keyboard for entering text.
setDefaultKeyboard()
setEmailAddressKeyboard()
Section titled “setEmailAddressKeyboard()”Use a keyboard that prominently features the @, period and space characters.
setEmailAddressKeyboard()
setNumberPadKeyboard()
Section titled “setNumberPadKeyboard()”Use a keyboard that prominently features the numbers 0 through 9.
setNumberPadKeyboard()
setNumbersAndPunctuationKeyboard()
Section titled “setNumbersAndPunctuationKeyboard()”Use a numeric keyboard with punctuation for entering text.
setNumbersAndPunctuationKeyboard()
setPhonePadKeyboard()
Section titled “setPhonePadKeyboard()”Use a keyboard that prominently feaetures the numbers 0 through 9 and the * and # characters.
setPhonePadKeyboard()
setTwitterKeyboard()
Section titled “setTwitterKeyboard()”Use a keyboard that prominently features the @ and # characters.
setTwitterKeyboard()
setURLKeyboard()
Section titled “setURLKeyboard()”Use a keyboard that prominently faetures the period and slash characters and the “.com” string.
setURLKeyboard()
setWebSearchKeyboard()
Section titled “setWebSearchKeyboard()”Use a keyboard that prominently features the space and period characters.
setWebSearchKeyboard()