{"repo":"braintree/android-card-form","free":true,"listed":false,"github":"https://github.com/braintree/android-card-form","clone":"git clone https://github.com/braintree/android-card-form.git","description":"A ready-made card form layout that can be included in your Android app, making it easy to accept credit and debit cards.","language":"Java","stars":373,"topics":["android","payments","credit-card","debit-card","ui","view"],"license":"MIT","category":"mobile-apps","readme_excerpt":"Card Form Card Form is a ready made card form layout that can be included in your app making it easy to accept credit and debit cards. Adding It To Your Project Add the dependency in your build.gradle : Usage Card Form is a LinearLayout that you can add to your layout: To initialize the view and change which fields are required for the user to enter, use the required field methods and CardForm#setup(AppCompatActivity activity) . To access the values in the form, there are getters for each field: To check if CardForm is valid call CardForm#isValid() . To validate each required field and show the user which fields are incorrect, call CardForm#validate() . To set custom error messages on a field call CardForm#setCardNumberError(String) on the given field. Additionally CardForm has 4 available listeners: CardForm#setOnCardFormValidListener called when the form changes state from valid to invalid or invalid to valid. CardForm#setOnCardFormSubmitListener called when the form should be submitted. CardForm#setOnFormFieldFocusedListener called when a field in the form is focused. CardForm#setOnCardTypeChangedListener called when the CardType in the form changes. Example Styling The card form uses the Android Design Support Library for styling and floating labels. All card form inputs use the colorAccent theme attribute, when present, to set their focused color. For more information on the colorAccent attribute, see Using the Material Theme. Additional styling, such as the error color ","default_branch":null,"files":null,"tree":[],"storefront":"/r/braintree","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/braintree/android-card-form/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}