Coder Social home page Coder Social logo

meli-card-drawer-android's Introduction

๐Ÿ“ฒ How to Install

Android Studio

Add this line to your app's build.gradle inside the dependencies section:

implementation 'com.mercadolibre.android:carddrawer:2.+'

๐ŸŒŸ Features

  • Easy to integrate
  • Card number, name, expiration date and CVV support (Card)
  • Card left and right image customization (CardUI)
  • CVV support at front & back view
  • Card flip animation integrated
  • Live card view updated while CardData protocol is edited
  • Support for custom overlay background image

๐Ÿ’ก Advanced features

Show security code

Gif

// You can highlight the security code location. 
// If the security code is behind, the card will transition with flip animation.
cardDrawerView.showSecurityCode();

Show front card view

cardDrawerView.show();

๐Ÿ’ณ Card data structure and style customization

You can customize the data structure and style of your card.

๐Ÿ”  Card

Using Card to update the card display values.

public class Card extends Observable implements Parcelable {
    private String number;
    private String name;
    private String expiration;
    private String secCode;
...

๐ŸŽจ CardUI

Using CardUI to customize: position of security code, card background, font color, place holders, etc.

public interface CardUI {
    /**
     * @return the bank logo to show
     */
    @DrawableRes
    int getBankImageRes();

    /**
     * @return the card logo to show
     */
    @DrawableRes
    int getCardLogoImageRes();

    /**
     * Sets the card logo image to the Imageview
     * @param cardLogo
     */
    void setCardLogoImage(@NonNull ImageView cardLogo);

    /**
     * Sets bank image to the Imageview
     * @param bankImage
     */
    void setBankImage(@NonNull ImageView bankImage);

    /**
     * @return the security code position
     */
    @SecurityCodeLocation
    String getSecurityCodeLocation();

    /**
     * @return color for text
     */
    @ColorInt
    int getCardFontColor();

    /**
     * @return color for paint de card
     */
    @ColorInt
    int getCardBackgroundColor();

    /**
     * @return number long
     */
    int getSecurityCodePattern();

    /**
     * Ej: **** **** **** ****
     *
     * @return the group of numbers
     */
    int[] getCardNumberPattern();

    /**
     * Ej: NOMBRE Y APELLIDO
     *
     * @return the name place holder to show
     */
    String getNamePlaceHolder();

    /**
     * Ej: MM/AA
     *
     * @return the expiration date place holder to show
     */
    String getExpirationPlaceHolder();

    /**
     * @return the font type
     */
    @FontType
    String getFontType();

    /**
     * @return the animation type
     */
    @CardAnimationType
    String getAnimationType();
}

How to make a local publish

./gradlew publishLocal

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Author

Mercado Libre

๐Ÿ‘ฎ๐Ÿป License

Copyright 2019 Mercadolibre Developers

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

meli-card-drawer-android's People

Contributors

appseginf avatar arandalean avatar arguser avatar daniivillegas avatar emiochoasanchez avatar francofusaro avatar github-actions[bot] avatar guchito9 avatar itamarlourenco avatar jorgonzalez291292 avatar marcospicco avatar maurorodriguez94 avatar murijr avatar romicorty avatar samantaalbanez avatar santiagolazzari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meli-card-drawer-android's Issues

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.