VGSTextInputLayout
Material component which wraps the VGS fields to show a floating label when the hint is hidden due to user inputting text.
<com.verygoodsecurity.vgscollect.widget.VGSTextInputLayout
android:id="@+id/cardFieldLay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hint="Card Number">
<com.verygoodsecurity.vgscollect.widget.VGSCardNumberEditText
android:id="@+id/cardField"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:fieldName="card_number"
app:numberDivider="-"/>
</com.verygoodsecurity.vgscollect.widget.VGSTextInputLayout>
Additional XML attributes
Attribute
Description
app:errorEnabled
Whether the layout is laid out as if an error will be displayed.
app:errorTextAppearance
Sets the text color and size for the error message from the specified TextAppearance
resource.
app:hintTextAppearance
Sets the collapsed hint text color from the specified ColorStateList
resource.
app:counterOverflowTextAppearance
Sets the text color and size for the overflowed character counter using the specified TextAppearance
resource.
app:counterTextAppearance
Sets the text color and size for the character counter using the specified TextAppearance
resource.
app:helperTextTextAppearance
Sets the text color and size for the helper text from the specified TextAppearance
resource.
app:helperText
Returns the helper message that was set to be displayed with setHelperText(CharSequence)
or null if no helper text was set or if helper text functionality is not enabled.
app:passwordToggleEnabled
When enabled, a button is placed at the end of the EditText which enables the user to switch between the field's input being visibly disguised or not.
app:passwordToggleTint
Applies a tint to the the password visibility toggle drawable.
app:passwordToggleDrawable
Applies a drawable on the the password toggle.
app:hintEnabled
Sets whether the floating label functionality is enabled or not in this layout.
app:hintTextColor
The color of the label when it is collapsed and the text field is active.
app:hintAnimationEnabled
Set whether any hint state change, due to being focused or non-empty text, are animated.
app:boxBackgroundModes
Set the box background more(filled, outline, or none).
app:boxBackgroundColor
Set the resource used for the filled box’s background color.
app:boxStrokeColor
Set the outline box’s border color.
app:boxCornerRadiusTopStart
Set the box’s top start corner radius.
app:boxCornerRadiusTopEnd
Set the box’s top end corner radius.
app:boxCornerRadiusBottomStart
Set the box’s bottom start corner radius.
app:boxCornerRadiusBottomEnd
Set the box’s bottom end corner radius.
app:boxCornerRadius
Set the box corners radius.
app:counterEnabled
Whether the character counter functionality is enabled or not in this layout.
app:counterMaxLength
Sets the max length to display at the character counter.
app:startIconTint
Applies a tint to the start icon drawable. Does not modify the current tint mode, which is SRC_IN by default.
app:startIconDrawable
Set the icon at the beginning of field.
app:endIconTint
Applies a tint to the end icon drawable. Does not modify the current tint mode, which is SRC_IN by default.
app:endIconDrawable
Set the icon to use for the end icon.
app:endIconModes
Set up the TextInputLayout.EndIconMode. When set, a button is placed at the end of the EditText which enables the user to perform the specific icon's functionality.
Last updated