@@ -402,6 +402,7 @@ public String getCardNumber() {
402402
403403 public void setCardNumber (String cardNumber ) {
404404 mCardNumber = cardNumber .replaceAll ("\\ s+" , "" );
405+ this .cardNumber .setText (addSpaceToCardNumber (mCardNumber ));
405406 redrawViews ();
406407 }
407408
@@ -411,6 +412,7 @@ public String getCardName() {
411412
412413 public void setCardName (String cardName ) {
413414 mCardName = cardName .toUpperCase ();
415+ this .cardName .setText (mCardName );
414416 redrawViews ();
415417 }
416418
@@ -421,6 +423,7 @@ public int getCardNumberTextColor() {
421423
422424 public void setCardNumberTextColor (@ ColorInt int cardNumberTextColor ) {
423425 mCardNumberTextColor = cardNumberTextColor ;
426+ this .cardNumber .setTextColor (mCardNumberTextColor );
424427 redrawViews ();
425428 }
426429
@@ -436,6 +439,7 @@ public void setCardNumberFormat(@CreditCardFormat int cardNumberFormat) {
436439 "unknown" );
437440 }
438441 mCardNumberFormat = cardNumberFormat ;
442+ this .cardNumber .setText (checkCardNumberFormat (mCardNumber ));
439443 redrawViews ();
440444 }
441445
@@ -446,6 +450,7 @@ public int getCardNameTextColor() {
446450
447451 public void setCardNameTextColor (@ ColorInt int cardNameTextColor ) {
448452 mCardNameTextColor = cardNameTextColor ;
453+ this .cardName .setTextColor (mCardNameTextColor );
449454 redrawViews ();
450455 }
451456
@@ -455,6 +460,7 @@ public String getExpiryDate() {
455460
456461 public void setExpiryDate (String expiryDate ) {
457462 mExpiryDate = expiryDate ;
463+ this .expiryDate .setText (mExpiryDate );
458464 redrawViews ();
459465 }
460466
@@ -465,6 +471,7 @@ public int getExpiryDateTextColor() {
465471
466472 public void setExpiryDateTextColor (@ ColorInt int expiryDateTextColor ) {
467473 mExpiryDateTextColor = expiryDateTextColor ;
474+ this .expiryDate .setTextColor (mExpiryDateTextColor );
468475 redrawViews ();
469476 }
470477
@@ -475,6 +482,7 @@ public int getValidTillTextColor() {
475482
476483 public void setValidTillTextColor (@ ColorInt int validTillTextColor ) {
477484 mValidTillTextColor = validTillTextColor ;
485+ this .validTill .setTextColor (mValidTillTextColor );
478486 redrawViews ();
479487 }
480488
@@ -489,6 +497,7 @@ public void setType(@CreditCardType int type) {
489497 "Use `CardType.*` or `CardType.AUTO` if unknown" );
490498 }
491499 mType = type ;
500+ this .type .setBackgroundResource (getLogo (mType ));
492501 redrawViews ();
493502 }
494503
@@ -535,6 +544,10 @@ public int getHintTextColor() {
535544
536545 public void setHintTextColor (@ ColorInt int hintTextColor ) {
537546 mHintTextColor = hintTextColor ;
547+ this .cardName .setHintTextColor (mHintTextColor );
548+ this .cardNumber .setHintTextColor (mHintTextColor );
549+ this .expiryDate .setHintTextColor (mHintTextColor );
550+
538551 redrawViews ();
539552 }
540553
@@ -545,6 +558,7 @@ public int getBrandLogo() {
545558
546559 public void setBrandLogo (@ DrawableRes int brandLogo ) {
547560 mBrandLogo = brandLogo ;
561+ this .brandLogo .setBackgroundResource (mBrandLogo );
548562 redrawViews ();
549563 }
550564
@@ -558,6 +572,7 @@ public void setBrandLogoPosition(int brandLogoPosition) {
558572
559573 public void putChip (boolean flag ) {
560574 mPutChip = flag ;
575+ chip .setVisibility (mPutChip ?View .VISIBLE :View .GONE );
561576 redrawViews ();
562577 }
563578
0 commit comments