CardInputWidget
A single-line card input widget.
To enable 19-digit card support, PaymentConfiguration.init must be called before CardInputWidget is instantiated.
The individual EditText
views of this widget can be styled by defining a style Stripe.CardInputWidget.EditText
that extends Stripe.Base.CardInputWidget.EditText
.
The card number, cvc, and expiry date will always be left to right regardless of locale. Postal code layout direction will be set according to the locale.
Constructors
Functions
Override of View.isEnabled that returns true
only if all three sub-controls are enabled.
Set a CardInputListener to be notified of card input events.
Set the card number. Method does not change text field focus.
Set a TextWatcher
to receive card number changes.
Set the CVC value for the card. Note that the maximum length is assumed to be 3, unless the brand of the card has already been set (by setting the card number).
Set an optional CVC field label to override defaults, or null
to use defaults.
Set a TextWatcher
to receive CVC value changes.
Enable or disable text fields
Set the expiration date. Method invokes completion listener and changes focus to the CVC field if a valid date is entered.
Set a TextWatcher
to receive expiration date changes.