Form inputs with sizes and style variations.
There are three types of Text Input components:
ThumbprintTextInput: A single line
ThumbprintEditTextwith no drawables. While you can use
ThumbprintTextInputWithDrawableswithout defining any drawables in place of this View, it is recommended to use this View if you do not plan on defining drawables. This is because
ThumbprintTextInputWithDrawableshas tap event listeners which will do unncessary work if no drawables are defined.
ThumbprintTextInputWithDrawables: A single line
ThumbprintEditTextwith support for start and end drawables. Drawable click events can be handled by assigning a lambda expression to
ThumbprintClearableTextInput: A single line
ThumbprintEditTextthat allows for a custom drawableStart, but not a custom drawableEnd. Instead, the drawableEnd will be a X that can be tapped to clear the current input and focus the View.
All the above components inherit from
ThumbprintEditTextBase, which iteslf inherits from
The following states are available for inputs: Default, selected, filled, disabled, and error.
The following are the new attributes added on top of Andriod’s default EditText:
hasError: Boolean. Indicates whether the Text Input is currently in an error state.
isDisabled: Boolean. Indicates whether the Text Input is currently in a disabled state.
state: Boolean. Returns the current state of the Text Input. Can not be set.
focusOnDrawableTap: Boolean. Indicates whether to listen for drawable click events.
drawableStartListener: () -> Unit. Callback for when
ThumbprintTextInputWithDrawables’s drawableStart is clicked.
drawableEndListener: () -> Unit. Callback for when
ThumbprintTextInputWithDrawables’s drawableEnd is clicked.