com.braintreepayments.cardform.view.CardEditText Java Examples

The following examples show how to use com.braintreepayments.cardform.view.CardEditText. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CardActivity.java    From braintree_android with MIT License 6 votes vote down vote up
@Override
public void onCardFormFieldFocused(View field) {
    if (mBraintreeFragment == null) {
        return;
    }

    if (!(field instanceof CardEditText) && !TextUtils.isEmpty(mCardForm.getCardNumber())) {
        CardType cardType = CardType.forCardNumber(mCardForm.getCardNumber());
        if (mCardType != cardType) {
            mCardType  = cardType;

            if (mConfiguration.getUnionPay().isEnabled() && !Settings.useTokenizationKey(getApplicationContext())) {
                UnionPay.fetchCapabilities(mBraintreeFragment, mCardForm.getCardNumber());
            }
        }
    }
}
 
Example #2
Source File: EditCardView.java    From braintree-android-drop-in with MIT License 4 votes vote down vote up
@Override
public void onCardFormFieldFocused(View field) {
    if (field instanceof CardEditText && mListener != null) {
        mListener.onBackRequested(this);
    }
}