Description
Card Form is a ready-made card form layout for Android apps that makes it easy to accept credit and debit cards. You add it to your layout as a LinearLayout view and set it up from your activity, choosing which fields are required. Your code can read the value of each field with getters, check whether the form is valid, validate the fields to show which ones are wrong, and set custom error messages on a field. Four listeners cover the form's life: one when it changes between valid and invalid, one when it should be submitted, one when a field gains focus, and one when the card type changes. Styling uses the Android Design Support Library for floating labels, and the inputs take their focus color from the colorAccent theme attribute. Other styling, such as the error color, can be set in your theme. The included sample app shows light and dark themes. The source is on GitHub under braintree/android-card-form.…
Highlights
- Drop-in card form layout for Android
- Choose which fields are required
- Validation and valid-state listeners
- Styled with floating labels and your theme colors
- Sample app with light and dark themes
Ratings & Reviews
No ratings yet
Be the first to rate Android Card Form.
People also visit
react-payment-inputs
A zero-dependency React Hook & Container to help with payment card input fields

react-payment-inputs
A React Hook & Container to help with payment card input fields
Apple Card
The Apple Card app allows users to manage their credit card, view statements
Android Card Form FAQ
What is Card Form?
A ready-made card form layout for Android that lets your app accept credit and debit card details.
How do I add it?
Add the dependency in your build.gradle file, add the Card Form view to your layout, and call setup from your activity.
Can I change the look?
Yes. Focus color comes from the colorAccent theme attribute, the error color can be set in your theme, and the sample app shows light and dark themes.
Where is the source?
The source is on GitHub at braintree/android-card-form.
What are the best Android Card Form alternatives?
Popular alternatives to Android Card Form include Appotapay, Apple Card and Payment Request. See all Android Card Form alternatives


