Ecosyste.ms: Awesome

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

https://github.com/michelelacorte/SwipeableCard

A simple implementation of swipe card like StreetView
https://github.com/michelelacorte/SwipeableCard

android android-ui card credit-card java library library-free maps-card swipe-cards

Last synced: about 2 months ago
JSON representation

A simple implementation of swipe card like StreetView

Lists

README

        


A simple implementation of swipe card like StreetView!!

[![Codacy Badge](https://api.codacy.com/project/badge/grade/99f0b52958a5425e9d9377a6c253b6fd)](https://www.codacy.com/app/micky1995/SwipeableCard)

[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/LacorteMichele)

[![API](https://img.shields.io/badge/API-14%2B-yellow.svg?style=flat)](https://android-arsenal.com/api?level=14)

[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)

[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-SwipeableCard-green.svg?style=true)](https://android-arsenal.com/details/1/2880)

[![alt tag](http://www.android-gems.com/badge/michelelacorte/SwipeableCard.svg)](http://www.android-gems.com/lib/michelelacorte/SwipeableCard?lib_id=753)

[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)

## DONATIONS

This project needs you! If you would like to support this project's further development, the creator of this project or the continuous maintenance of this project, feel free to donate. Your donation is highly appreciated (and I love food, coffee and beer). Thank you!

**PayPal**

* **[Donate $5]**: Thank's for creating this project, here's a coffee (or some beer) for you!

* **[Donate $10]**: Wow, I am stunned. Let me take you to the movies!ù

* **[Donate $15]**: I really appreciate your work, let's grab some lunch!

* **[Donate $25]**: That's some awesome stuff you did right there, dinner is on me!

* **[Donate $50]**: I really really want to support this project, great job!

* **[Donate $100]**: You are the man! This project saved me hours (if not days) of struggle and hard work, simply awesome!

* **[Donate $2799]**: Go buddy, buy Macbook Pro for yourself!

Of course, you can also choose what you want to donate, all donations are awesome!! Follow this link [Donate](https://www.paypal.me/MicheleLacorte)!!

If you want to contribute you may download [Donation App](https://play.google.com/store/apps/details?id=it.michelelacorte.githubdonation) from Google Play

## EXAMPLE

#### Swipeable Card is on Google Play!!!


Get it on Google Play

#### If you want to help me please download Donation App!!


Get it on Google Play

#### And Amazon Store


Get it on Amazon Store

#### [See video demo here](https://www.youtube.com/watch?v=81gAqOm1m5w)

#### Credit Card!!
##### In collaboration with [cooltechworks](https://github.com/cooltechworks) and [CreditCardView](https://github.com/cooltechworks/CreditCardView)

![alt tag](http://i.giphy.com/3ornjQLD95Osp4qlm8.gif)

![alt tag](http://i.giphy.com/26tn8QOAqL4SVyRsA.gif)

#### Maps Card

![alt tag](http://i.giphy.com/26FPDYox55jE0UBVu.gif)

![alt tag](http://s2.postimg.org/i7te06hqx/Screenshot_2016_02_20_21_44_02.png)

#### Swipe to Dismiss

![alt tag](http://i.giphy.com/3o7rc2savJab4JExI4.gif)

#### New Floating Action Button!!!

![alt tag](http://i.giphy.com/3o8doUXxjOCwHw2GEo.gif)

![alt tag](http://i.giphy.com/26tP83JrpN9mpN5wA.gif)

![alt tag](http://i.giphy.com/d2Za0uOe8fPYa38Q.gif)

#### Possibility to use SwipeableCard in RecyclerView!!!

![alt tag](http://i.giphy.com/3o8doQxv28CVTGdM6Q.gif)

## USAGE

Swipeable Card is pushed to JCenter, so you just need to add the following dependency to your `build.gradle`.
```groovy
compile 'it.michelelacorte.swipeablecard:library:2.3.0'
```

In alternative you can use AAR repository with:

```groovy
allprojects {
repositories {
maven { url "https://dl.bintray.com/michelelacorte/maven/" }
jcenter()
mavenCentral()

}
}
```

And add this dependecies

```groovy
compile 'it.michelelacorte.swipeablecard:library:2.3.0@aar'
```

## DOCUMENTATION

- [Full Documentation](http://michelelacorte.github.io/SwipeableCard/docs/javadoc/index.html)

- [Swipeable Single Card Example](https://github.com/michelelacorte/SwipeableCard/blob/master/SINGLECARD.md)

- [Swipeable RecyclerView Card Example](https://github.com/michelelacorte/SwipeableCard/blob/master/RECYCLERVIEW.md)

- [Customization Card Example](https://github.com/michelelacorte/SwipeableCard/blob/master/CUSTOMIZATION.md)

- [Any Card Layout Example](https://github.com/michelelacorte/SwipeableCard/blob/master/ANYCARD.md)

- [Maps Card Example](https://github.com/michelelacorte/SwipeableCard/blob/master/MAPS.md)

- [Credit Card Example](https://github.com/michelelacorte/SwipeableCard/blob/master/CREDIT.md)

- [Attribute Table](https://github.com/michelelacorte/SwipeableCard/blob/master/ATTRS.md)

## SYSTEM REQUIREMENT

Android API 14+

## STATUS

![project maintained](https://img.shields.io/badge/Project-Maintained-green.svg)

## CHANGELOG

**v2.3.0**
- Credit Card added!! (See [Preview](http://i.giphy.com/3ornjQLD95Osp4qlm8.gif))
- Credit Card in `RecyclerView`
- Swipe up/down functionality (automatic and swipe gesture mode)
- Added `isAutoAmination` attribute
- Update support library to latest version `23.2.1`
- Update documentation to `2.3.0`
- Update version `1.2` of Application Demo
- Fixed `RecyclerView` duplicate menù item in multiple marker mode maps
- Added Codacy code review and fixed some issue (from B to A level see [![Codacy Badge](https://api.codacy.com/project/badge/grade/99f0b52958a5425e9d9377a6c253b6fd)](https://www.codacy.com/app/micky1995/SwipeableCard))

**v2.2.0**
- Maps Fragment added (with many method see [Preview](http://i.giphy.com/26FPDYox55jE0UBVu.gif))!
- Maps mode in `RecyclerView` SwipeableCard
- Maps single marker mode and multiple marker mode support
- Improved hierarchy type of Card
- Improved `Builder()` constructor
- Fixed issue in `OptionViewAdditional`
- Added documentation to GitHub repo: [Here](http://michelelacorte.github.io/SwipeableCard/docs/javadoc/index.html)
- Version 1.1 of Application Demo

**v2.1.0**
- Added Attribute to XML (see [Attribute Table](https://github.com/michelelacorte/SwipeableCard/blob/master/ATTRS.md))
- New version of App demo (release on [Play Store](https://play.google.com/store/apps/details?id=it.michelelacorte.exampleswipeablecard))
- Multiple instance of `SwipeableCard` in the same class with `init(..)` method (see [Multiple Instance](https://github.com/michelelacorte/SwipeableCard/blob/master/SINGLECARD.md#multiple-instance))
- Improved `SwipeableCard` class
- Improved `OptionView` and `OptionViewAdditional` and other class with annotations and more bug fix
- Swipe to dismiss function added (see [Preview](http://i.giphy.com/3o7rc2savJab4JExI4.gif))
- Fixed `RecyclerView` blinking

**v2.0.0**
- Support all custom `CardView` Layout!!!
- Improved `RecyclerView` animation
- `Fab` button added
- Fixed minor bug for compatibility with API 14+
- Added three `ImageView` button (see [Customization](https://github.com/michelelacorte/SwipeableCard/blob/master/CUSTOMIZATION.md))
- Added two `TextView` (see [Customization](https://github.com/michelelacorte/SwipeableCard/blob/master/CUSTOMIZATION.md))
- Added method `setCardRadius(int radius)` default 4

**v1.0.1**
- Support API 14+
- Update support library and gradle

**v1.0.0**
- Support API 21+
- Added class `SwipeableCard.java` for setUp view of Swipeable Card.
- Added class `OptionView.java` that contains setter for set-up card with your own options.
- Added class `SwipeableCardAdapter.java` an adapter ready to use the Swipeable Card in RecyclerView, its constructor accepts `List` for each optionsView of card and `Context`.
- Added interface `AnimationCard` with abstract method for animation (for completeness only).
- Added method `setOptionView(OptionView optionViews)` called by OptionView class for set-up card with your own options.
- Added example App.

Method called by `OptionView.getOptionView()`
- Added method `getDuration()`
- Added method `getTitle()`
- Added method `getColorTitle()`
- Added method `getMenuItem()`
- Added method `getImage()`
- Added method `getSubTitle()`
- Added method `getColorToolbar()`
- Added method `getText()`
- Added method `getToolbarListener()`
- Added method `isSubTitle()` check if Sub Title is set
- Added method `isMenuItem()` check if menuItem is set
- Added method `isImage()` check if Image is set
- Added method `isText()` check if Text is set

Method called by `OptionView.Builder()`

- Added method `setDuration(long duration)` default is 500 millis
- Added method `toolbarListener(Toolbar.OnMenuItemClickListener toolbarListener)` for set-up the menù item on click
- Added method `title(String title)` default is empty
- Added method `colorTitle(int color)` default is black
- Added method `menuItem(int menuItem)` default there isn't a menu
- Added method `image(int image)` for set drawable image
- Added method `subTitle(String subTitle)` default isn't set
- Added method `toolbarColor(int color)` default is `transparent`
- Added method `text(String text)`for set custom text
- Added method `build()` for build swipeable card with custom configuration

## CREDITS

Author: Michele Lacorte ([email protected])

## CONTRIBUTING

If you want to contribute to the project fork it and open [Pull Request](https://github.com/michelelacorte/SwipeableCard/pulls), or contact me by e-mail.

Each proposal will be accepted!

Follow my [Google+](https://plus.google.com/u/0/collection/McidZB)

## LICENSE

```
Copyright 2016 Michele Lacorte

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

[Donate $5]: https://www.paypal.me/MicheleLacorte/5
[Donate $10]: https://www.paypal.me/MicheleLacorte/10
[Donate $15]: https://www.paypal.me/MicheleLacorte/15
[Donate $25]: https://www.paypal.me/MicheleLacorte/25
[Donate $50]: https://www.paypal.me/MicheleLacorte/50
[Donate $100]: https://www.paypal.me/MicheleLacorte/100
[Donate $2799]: https://www.paypal.me/MicheleLacorte/2799

## Support on Beerpay
Hey dude! Help me out for a couple of :beers:!

[![Beerpay](https://beerpay.io/michelelacorte/SwipeableCard/badge.svg?style=beer-square)](https://beerpay.io/michelelacorte/SwipeableCard) [![Beerpay](https://beerpay.io/michelelacorte/SwipeableCard/make-wish.svg?style=flat-square)](https://beerpay.io/michelelacorte/SwipeableCard?focus=wish)