TtTextInputField
A reusable UI control to let the user enter text.
This control provides ttHintText as a placeholder for the input text required for the input field and ttInputText for the text that the input field contains. ttHelperText shown below the input field can be used to help the user understand what information is requested for the input field. ttErrorText, which is also shown below the input field, can be used to indicate to the user the entered input is incorrect or there is an error occurred due to the input. The control also provides the ttClearIcon for the user to clear the input.
NOTE: For security reasons, this view should not be used when involving sensitive data, for example, passwords.
Parameters
The display context.
The attribute set provided in the layout XML file.
An attribute that references a resource with default values. Use 0 to not look for defaults.
Constructors
Properties
Input Method Editor (IME) options associated with the EditText when it has focus.
An icon shown at the end of the input field. It clears the input text while being pressed. If set to null, the icon will not be visible.
An error message shown below the input field. It provides more context to help the user understand that incorrect input has been entered or there is an error that occurs from the entered input. When the error text is set, the helper text will not be visible until the error text is cleared. If set to null, the error message will not be shown.
The text shown below the input field. It provides more context to help the user understand what information is requested for the input field. If set to null, the helper text will not be shown.
The initial text shown in the input field when there is no user input yet. It gives users a hint for the input text required for the field. If set to null, the hint text will not be shown.
The text that input field is displaying. If set to null, the field text will be cleared.
Functions
Adds a watcher to the list of those whose methods are called whenever this view's input text changes.
Adds an action which will be invoked when the text is changing.
Removes the watcher from the list of those whose methods are called whenever this view's input text changes.
Sets ttErrorText by resolving the text from the given StringResolver.
Sets ttHelperText by resolving the text from the given StringResolver.
Sets ttHintText by resolving the text from the given StringResolver.
Inherited functions
An inverse binding adapter that adds support for two-way data binding for TtTextInputField.ttInputText.
A binding adapter that adds support for two-way data binding for TtTextInputField.ttInputText.