vinaygaba / CreditCardView

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

Issues with CreditCardView #23

Open lovekeshargalon opened 8 years ago

lovekeshargalon commented 8 years ago

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

itamarkaufman commented 8 years ago

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

qazimusab commented 7 years ago

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

vrfloppa commented 7 years ago

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)
        }
    }
vinaygaba commented 7 years ago

Can you try this @itamarkaufman @lovekeshargalon @qazimusab

If this doesn't solve your problem, I will fix it over the weekend. Would really appreciate if you could give this a shot.

parthibans commented 7 years ago

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