Coder Social home page Coder Social logo

Comments (4)

vinaygaba avatar vinaygaba commented on July 4, 2024

@bktowett Hey the library works fine even when the fields are populated programmatically? Can you give me more context ? It could be some other issue. What version of the library are u using?

from creditcardview.

bktowett avatar bktowett commented on July 4, 2024

@vinaygaba here is my gradle config

apply plugin: 'com.android.application' android { compileSdkVersion 24 buildToolsVersion "24.0.0" defaultConfig { applicationId "com.ceva.codevinci.creditcard" minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:24.1.1' compile 'com.vinaygaba:creditcardview:1.0.3' }

this is my xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.ceva.codevinci.creditcard.MainActivity"> <com.vinaygaba.creditcardview.CreditCardView android:id="@+id/card1" android:layout_width="fill_parent" android:layout_height="225dp" android:background="@drawable/cardbackground_world" android:layout_marginBottom="16dp" android:layout_marginTop="16dp" app:cardNumberTextColor="#cccccc" app:cardNumberFormat="masked_all_but_last_four" app:cardNameTextColor="#cccccc" app:type="auto" app:brandLogo="@drawable/brandlogo" app:putChip="true" app:expiryDate = "02/22" app:expiryDateTextColor="#cccccc" app:isEditable="false" app:validTillTextColor="#cccccc" app:hintTextColor = "#cccccc" /> </RelativeLayout>

Finally, here is my activity

public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); CreditCardView creditCardView2= new CreditCardView(this); creditCardView2.setCardNumber("4444444444444444"); creditCardView2.setCardName("CODEVINCI LEONARDO"); creditCardView2.setIsEditable(false); }

from creditcardview.

vinaygaba avatar vinaygaba commented on July 4, 2024

@bktowett Can you try changing the last line to the following:

creditCardView2.setIsEditable(true);

additionally change the XML attribute to true as well

app:isEditable="true"

from creditcardview.

bktowett avatar bktowett commented on July 4, 2024

@vinaygaba I appreciate your very quick responses. Sadly, it still doesn't work after your suggestions.

from creditcardview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.