Comments (4)
@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.
@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.
@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.
@vinaygaba I appreciate your very quick responses. Sadly, it still doesn't work after your suggestions.
from creditcardview.
Related Issues (20)
- expiration defaults to standard keyboard HOT 1
- Can't use with RecyclerView HOT 6
- Cvv max length dinamyc by CardType HOT 1
- Card type auto detection not working on "All but last four" number format
- 1.0.3 declared but getting code inconsistent with (older than) release commit HOT 2
- Font problem HOT 3
- I want to put CVV HOT 1
- Issues with CreditCardView HOT 5
- passing value into card programmatically HOT 10
- Change card programmatically not work in DialogFragment HOT 1
- [BUG] crashes when type is set to 'none' HOT 5
- Use card View instead of RelativeLayout
- Keep aspect ratio HOT 1
- Can't set plain background on Android 4.2 HOT 1
- How to save values
- Add set and get Cvv function HOT 4
- you have a problem with crediCardView.getCardNumber();
- BMO credit card
- Nesecito
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from creditcardview.