Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with CreditCardView #23

Open
lovekeshargalon opened this issue Sep 14, 2016 · 5 comments
Open

Issues with CreditCardView #23

lovekeshargalon opened this issue Sep 14, 2016 · 5 comments

Comments

@lovekeshargalon
Copy link

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

@itamarkaufman
Copy link

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

@qazimusab
Copy link

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

@vrfloppa
Copy link

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
Copy link
Owner

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.

@parthibans
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants