public class ExpiryDateEditText extends StripeEditText
EditText that handles putting numbers around a central divider character.| Constructor and Description |
|---|
ExpiryDateEditText(android.content.Context context) |
ExpiryDateEditText(android.content.Context context,
android.util.AttributeSet attrs) |
ExpiryDateEditText(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getValidDateFields()
Gets the expiry date displayed on this control if it is valid, or
null if it is not. |
boolean |
isDateValid()
Gets whether or not the date currently entered is valid and not yet
passed.
|
void |
setExpiryDateEditListener(com.stripe.android.view.ExpiryDateEditText.ExpiryDateEditListener expiryDateEditListener) |
getCachedColorStateList, getDefaultErrorColorInt, getShouldShowError, onCreateInputConnection, onDetachedFromWindow, setErrorColor, setHintDelayed, setShouldShowErrorpublic ExpiryDateEditText(android.content.Context context)
public ExpiryDateEditText(android.content.Context context,
android.util.AttributeSet attrs)
public ExpiryDateEditText(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
public boolean isDateValid()
true if the text entered represents a valid expiry date that has not
yet passed, and false if not.public int[] getValidDateFields()
null if it is not.
The return value is given as a length-2 int array, where the first entry is the
two-digit month (from 01-12) and the second entry is the four-digit year (2017, not 17).int array of the form {month, year} if the date is valid, or null
if it is notpublic void setExpiryDateEditListener(com.stripe.android.view.ExpiryDateEditText.ExpiryDateEditListener expiryDateEditListener)