SSNEditText
Provides a user interface element that represents a Social Security Number (SSN).
Set field name
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. It is highly important to specify this parameter because the VGSCollect module relies on it too.
Warning: You must set up fieldName in other way input field will be ignored by VGSCollect.
<com.verygoodsecurity.vgscollect.widget.SSNEditText
android:id="@+id/ssnField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:fieldName="ssn_field_name"/>val ssnField = findViewById<SSNEditText>(R.id.ssnField)
ssnField.setFieldName("ssn_field_name")SSNEditText ssnField = findViewById(R.id.ssnField);
ssnField.setFieldName("ssn_field_name");Define the required state
Specifies whether the text inside input field is required to be filled.
When app:isRequired set as true, then input data should be valid only. If app:isRequired set as false, then input data will be valid in case the field is empty. Otherwise input data should be valid.
By default, a widget is required.
<com.verygoodsecurity.vgscollect.widget.SSNEditText
android:id="@+id/ssnField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isRequired="false"/>val ssnField = findViewById<SSNEditText>(R.id.ssnField)
ssnField.isRequired(false)SSNEditText ssnField = findViewById(R.id.ssnField);
ssnField.isRequired(false);Define number group divider
To set the symbol that will divide groups of digits in the number add app:numberDivider to your field's declaration in xml. By default, Collect SDK adds - character as divider symbol.
<com.verygoodsecurity.vgscollect.widget.SSNEditText
android:id="@+id/ssnField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:numberDivider="-"/>val ssnField = findViewById<SSNEditText>(R.id.ssnField)
ssnField.setDivider('-')SSNEditText ssnField = SSNEditText(R.id.ssnField);
ssnField.setDivider('-');Also, VGS Collect SDK gives an ability to change or to remove divider symbol before it has been submitted to the Proxy.
To set the symbol that will divide groups of digits in the number add app:outputNumberDivider to your field's declaration in xml. By default, Collect SDK adds - character as divider symbol.
Info: app:numberDivider and app:outputNumberDivider should contain only one character.
<com.verygoodsecurity.vgscollect.widget.SSNEditText
android:id="@+id/ssnField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:outputNumberDivider="-"/>val ssnField = findViewById<SSNEditText>(R.id.ssnField)
ssnField.setOutputDivider('-')SSNEditText ssnField = findViewById(R.id.ssnField);
ssnField.setOutputDivider('-');Additional XML attributes
Attribute
Description
app:numberDividerSets the symbol that will divide groups of digits in the number. This divider will be visible to user in `SSNEditText` field.
app:outputNumberDividerSets the symbol that will divide groups of digits before submit to the Proxy.
app:inputTypeSet the type of the content with a constant as defined for input field.
app:imeOptionsSpecify soft input method for the input method action. By default, the system uses a
actionNextPlain textor
actionDonePlain textaction.
app:fontFamilyDefault font family (named by string or as a font resource reference) for the text.
app:fieldNameSets 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.
app:isRequiredSpecifies whether the text inside input field is required to be filled.
app:textSizeSize of the text.
app:ellipsizeIf set, causes words that are longer than the view is wide to be ellipsized instead of broken in the middle.
app:ellipsizeIf set, causes words that are longer than the view is wide to be ellipsized instead of broken in the middle.
app:textText to display.
app:textColorText color.
app:maxLinesMakes the View be at most this many lines tall.
app:minLinesMakes the View be at least this many lines tall.
app:textStyleStyle (normal, bold, italic) for text.
app:cursorVisibleMakes the cursor visible (the default) or invisible.
app:gravitySpecifies how to align the text by the view’s x- or y-axis when the text is smaller than the view.
app:scrollHorizontallyWhen the text is allowed to be wider than the view (and therefore can be scrolled horizontally).
app:hintHint text to display when the text is empty.
Last updated

