GiftCard

GiftCard

项目地址: ldoublem/GiftCard
简介:A beautiful gift Cards for Android

A beautiful gift Cards for android

Inspiration comes from dribbble

Preview


gif shot1 shot2

Requirements

Use Android Studio 2.2 Preview 5 or higher, as the following are not available in earlier versions:

  • com.android.tools.build:gradle:2.2.0-alpha5
  • com.android.support.constraint:constraint-layout:1.0.0-alpha3

Gradle

compile 'com.ldoublem.GiftCard:giftcardlib:0.3'


Usage with xml

             <com.ldoblem.giftcardlib.GiftCardView
                android:layout_width="300dp"
                android:layout_height="200dp"
                card:bgStartColor="#11cd6e"
                card:buyButtonColor="#11cd6e"
                card:cardBgColor="#33475f"
                card:buttonByText="购买"
                card:cardGiftTitle="礼物卡"
                card:cardGiftLogo="@mipmap/ic_launcher"
                card:buttonCheckText="确定"
                card:checkButtonColor="#2c2c2c"
                card:bgPackColor="#56abe4"
                card:priceTextColor="#fff"/>

Usage with java

        mGiftCardView = (GiftCardView) findViewById(R.id.gc_shop);
        mGiftCardView.setMTitle("苹果礼券");
        mGiftCardView.setMPrice(188);
        mGiftCardView.setButtonBuyText("买");
        mGiftCardView.setButtonCheckText("确定");
        mGiftCardView.setCardTip("请检查你的购物单");
        mGiftCardView.setCardBgColor(Color.BLACK);
        mGiftCardView.setGiftLogo(R.mipmap.ic_launcher);
        mGiftCardView.setBgStartColor(Color.BLACK);
        mGiftCardView.setBgEndColor(Color.BLACK);
        mGiftCardView.setBuyButtonColor(Color.BLACK);
        mGiftCardView.setCheckButtonColor(Color.BLACK);
        mGiftCardView.setPriceTextColor(Color.BLACK);
        mGiftCardView.setBgPackBgColor(Color.BLACK);
        mGiftCardView.setOnCheckOut(new GiftCardView.Buyer("陆先生", "中国浙江省",
                        "杭州市,西湖区,南山路 100 号", "有效期:3 天"),
                new GiftCardView.OnCheckOut() {
                    @Override
                    public void Ok(int vid) {

                    }
                });


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值