vinaygaba / CreditCardView

💳 CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card.
796 stars 143 forks source link

Change card programmatically not work in DialogFragment #29

Open kingfisherphuoc opened 7 years ago

kingfisherphuoc commented 7 years ago

I have dialog fragment which saves/sets the creditcard information programmatically. Everything works ok but the show the saved creditcard info. I'm using this line of code to set creditcard programmtically:

creditCardView.setExpiryDate(expdate);
creditCardView.setCardNumber(creditCard.number);

I think the problem is that you dont reset the text of your expiryDate and cardNumber, just call the function invalidate(); to redraw the view.

vinaygaba commented 6 years ago

Can you try the latest library version that I just pushed - 1.0.4