Open lovekeshargalon opened 8 years ago
Also using Recycler View and can't fill the card from the onBindViewHolder
Can't fill the card at all and not using RecyclerView
As a temporary solution, you can call private method 'initDefaults' on your CreditCardView object via reflection. It invokes all edittext.setText methods with the string values, that you have supplied to view earlier.
I bind data to CreditCardView like this (yep, its kotlin)
private fun createViewFromCard(card: Card): View {
return CreditCardView(context).apply {
isEditable = false
cardNumber = card.id
background = ViewUtils.createCardDrawable(card.color)
cardName = card.owner
expiryDate = card.validTill
val invalidateMethod = this.javaClass.getDeclaredMethod("initDefaults")
invalidateMethod.isAccessible = true
invalidateMethod.invoke(this)
}
}
Can you try this @itamarkaufman @lovekeshargalon @qazimusab
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
compile 'com.github.vinaygaba:CreditCardView:v1.0.3'
}
If this doesn't solve your problem, I will fix it over the weekend. Would really appreciate if you could give this a shot.
how to removed card type like visa,master.... i need only blank car type pls suggest me
I can use within the RecyclerView & not set Data in CreditCardView.