CreditCardView icon indicating copy to clipboard operation
CreditCardView copied to clipboard

Issues with CreditCardView

Open lovekeshargalon opened this issue 8 years ago • 5 comments

I can use within the RecyclerView & not set Data in CreditCardView. screenshot_20160914-172122

lovekeshargalon avatar Sep 14 '16 11:09 lovekeshargalon

Also using Recycler View and can't fill the card from the onBindViewHolder

itamarkaufman avatar Oct 18 '16 12:10 itamarkaufman

Can't fill the card at all and not using RecyclerView

qazimusab avatar Jan 16 '17 19:01 qazimusab

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)
        }
    }

vrfloppa avatar Apr 16 '17 13:04 vrfloppa

Can you try this @itamarkaufman @lovekeshargalon @qazimusab

  • Add JitPack to the project's build.gradle
allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}
  • Add this project's dependency in the app's build.gradle
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.

vinaygaba avatar Apr 22 '17 05:04 vinaygaba

how to removed card type like visa,master.... i need only blank car type pls suggest me

parthibans avatar Dec 06 '17 12:12 parthibans