Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iamageo/bankcardview

💳 Bank Card View is a simple and elegant card view with Flip animation.
https://github.com/iamageo/bankcardview

android android-library bank-android bank-card-view bank-view card-types card-view flip flip-animation hacktoberfest hacktoberfest-accepted jitpack kotlin

Last synced: 16 days ago
JSON representation

💳 Bank Card View is a simple and elegant card view with Flip animation.

Awesome Lists containing this project

README

        

Bank Card View




💳 Bank Card View is a simple and elegant card view with Flip animation.


License
API
repo size


forks
stars

## Including in your project
[![](https://jitpack.io/v/iamageo/bank-card-view.svg)](https://jitpack.io/#iamageo/bank-card-view)
### Gradle
Add below codes to your **root** `build.gradle` file (not your module build.gradle file).
```gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
And add a dependency code to your **module**'s `build.gradle` file.
```gradle
dependencies {
implementation 'com.github.iamageo:bank-card-view:1.0.0'
}
```

## Basic Usage
Add in you layout file.

```xml

```
Call in your Activity:
```kotlin
class MainActivity : AppCompatActivity() {

private lateinit var binding: ActivityMainBinding

private val animation: FlipBankCardViewAnimation? = null

override fun onCreate(savedInstanceState: Bundle?) {
binding = ActivityMainBinding.inflate(layoutInflater)
super.onCreate(savedInstanceState)
setContentView(binding.root)

//attributes
binding.myBankCardView.bankCardName = "Jhon Doe"
binding.myBankCardView.bankCardNumber = "0001 0002 0003 0004"
binding.myBankCardView.bankCardValidate = "02/27"
binding.myBankCardView.bankCardCVV = "007"
binding.myBankCardView.bankCardLogo = BankCardView.CardLogo.MASTERCARD
binding.myBankCardView.bankCardBackground = BankCardView.CardBackground.RIPE_MALINKA

//click event
binding.myBankCardView.setOnClickListener {
startAnimation(animation, binding.myBankCardView, binding.myBankCardView, 180)
}
}
}
```

## Bank Card View Attributes
Attributes | Type | Description
--- | --- | ---
bankCardName | String | Name of card.
bankCardNumber | String | Number of card.
bankCardValidate | String | Validate date.
bankCardCVV | String | Security code of card.
bankCardLogo | Int (drawable) | Logo of card.
bankCardBackground | Int (drawable) | Background for card view.

## Types of logo
[Source of logos](https://vetores.org/)

| VISA | CIELO | MASTERCARD | AMERICAN_EXPRESS
| :---------------: | :---------------: | :---------------: | :---------------: |
| | | |

For use card logo, call:

```kotlin
binding.myBankCardView.bankCardLogo = BankCardView.CardLogo.MASTERCARD
```

## Types of background
[Source of backgrounds](https://webgradients.com/)

| RIPE_MALINKA |AMY_CHRISP | TRUE_SUNSET | PURPLE_DIVISION
| :---------------: | :---------------: | :---------------: | :---------------: |
| | | | |

For use backgrounds, call:

```kotlin
binding.myBankCardView.bankCardBackground = BankCardView.CardBackground.RIPE_MALINKA
```

## License
```
Copyright 2022 Geovani Amaral

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.
```