UI Components¶

Your app’s user interface and everything that users can see and interact with.

VGSEditText¶

A base user interface element that displays text.

setFieldType¶

Sets type of current input field. Choosing the input type you configure the limitations for this type.

Related xml attributes: app:fieldType

 FieldType Description cardNumber Type: the card number. cvc Type: card security code. expDate Type: card expiration date. cardHolderName Type: cardHolderName. info Type: any type of data.

public void setFieldType(FieldType type)

 Parameter type enum: type of EditText.

getFieldType¶

Returns the current type of the field.

public FieldType getFieldType()

 Returns FieldType The type of EditText.

setFieldName¶

Sets the text to be used for data transfer to VGS proxy. Usually, it is similar to field-name in JSON path in your inbound route filters.

Related xml attributes: app:fieldName

public void setFieldName(int resId)

 Parameter resId Int: the resource identifier of the string resource to be displayed.

public void setFieldName(String text)

 Parameter text String: text to be used.

getFieldName¶

Return the text that field is using for data transfer to VGS proxy.

public String getFieldName()

 Returns String The text used by the field.

setIsRequired¶

Specifies whether the text inside input field is required to be filled.

Related xml attributes: app:isRequired

public void setIsRequired(boolean state)

 Parameter state Boolean: field required to be filled (the default) or can be skipped.

 Attribute Description app:textSize Size of the text. app:ellipsize If set, causes words that are longer than the view is wide to be ellipsized instead of broken in the middle. app:text Text to display. app:textColor Text color. app:maxLines Makes the View be at most this many lines tall. app:minLines Makes the View be at least this many lines tall. app:textStyle Style (normal, bold, italic) for text. app:cursorVisible Makes the cursor visible (the default) or invisible. app:gravity Specifies how to align the text by the view’s x- or y-axis when the text is smaller than the view. app:scrollHorizontally When the text is allowed to be wider than the view (and therefore can be scrolled horizontally). app:hint Hint text to display when the text is empty.

VGSCardNumberEditText¶

A user interface element that displays text to the user in card number format.

setCardBrandIconGravity¶

Specifies how to align the icon by the view’s x-axis. To specify gravity programmatically you could use android Gravity class.

Related xml attributes: app:cardBrandIconGravity

public void setCardBrandIconGravity(int gravity)

Note

At the current moment we support only start and end position.

 Parameter gravity Int: Specifies how to align the icon by the view’s x-axis.

setDivider¶

Sets the symbol that will divide groups of digits in the card number.

Related xml attributes: app:numberDivider

public void setDivider(Char char)

 Parameter char Char: The divider symbol.

 Attribute Description app:fieldName Sets the text to be used for data transfer to VGS proxy app:isRequired Specifies whether the text inside input field is required to be filled. app:textSize Size of the text. app:ellipsize If set, causes words that are longer than the view is wide to be ellipsized instead of broken in the middle. app:text Text to display. app:textColor Text color. app:maxLines Makes the View be at most this many lines tall. app:minLines Makes the View be at least this many lines tall. app:textStyle Style (normal, bold, italic) for text. app:cursorVisible Makes the cursor visible (the default) or invisible. app:gravity Specifies how to align the text by the view’s x- or y-axis when the text is smaller than the view. app:scrollHorizontally When the text is allowed to be wider than the view (and therefore can be scrolled horizontally). app:hint Hint text to display when the text is empty.

VGSTextInputLayout¶

Material component which wraps the VGS fields to show a floating label when the hint is hidden due to user inputting text.

setError¶

Sets an error message that will be displayed below

public void setError(CharSequence text)

 Parameter text CharSequence: error message to be displayed