A simple implementation of swipe card like StreetView

Overview

A simple implementation of swipe card like StreetView!!

Codacy Badge

Twitter

API

License

Android Arsenal

alt tag

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!!

If you want to contribute you may download Donation App 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

Credit Card!!

In collaboration with cooltechworks and CreditCardView

alt tag

alt tag

Maps Card

alt tag

alt tag

Swipe to Dismiss

alt tag

New Floating Action Button!!!

alt tag

alt tag

alt tag

Possibility to use SwipeableCard in RecyclerView!!!

alt tag

USAGE

Swipeable Card is pushed to JCenter, so you just need to add the following dependency to your build.gradle.

compile 'it.michelelacorte.swipeablecard:library:2.3.0'

In alternative you can use AAR repository with:

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

    }
}

And add this dependecies

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

DOCUMENTATION

SYSTEM REQUIREMENT

Android API 14+

STATUS

project maintained

CHANGELOG

v2.3.0

  • Credit Card added!! (See Preview)
  • 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)

v2.2.0

  • Maps Fragment added (with many method see Preview)!
  • 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
  • Version 1.1 of Application Demo

v2.1.0

  • Added Attribute to XML (see Attribute Table)
  • New version of App demo (release on Play Store)
  • Multiple instance of SwipeableCard in the same class with init(..) method (see 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)
  • 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)
  • Added two TextView (see Customization)
  • 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<OptionView> 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, or contact me by e-mail.

Each proposal will be accepted!

Follow my Google+

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.

Support on Beerpay

Hey dude! Help me out for a couple of 🍻 !

Beerpay Beerpay

Comments
  • Other views from the same page are not clickable

    Other views from the same page are not clickable

    Great library! I'm using the Swipeable RecyclerView with several edittexts and buttons on the same page. The layout is like this:

    <CoordinatorLayout>
        <LinearLayout>
            <EditText />
            <Button />
        </LinearLayout>
        <RecyclerView />
    </CoordinatorLayout>
    

    I realized both edittexts and buttons are not clickable. I think that's because of the RecyclerView captures the whole screen. Any suggestions to replace the linearLayout? How about AppBarLayout?

    opened by Songroid 7
  • [PROBLEM][SOLVED] Cannot resolve .image() in RecyclerView OptionViews builder.

    [PROBLEM][SOLVED] Cannot resolve .image() in RecyclerView OptionViews builder.

    The error code provided in your documentation: optionViews.add(new OptionView.Builder() .image(R.drawable.bus_stop) .title("TITLE") .colorTitle(R.color.colorPrimary) .menuItem(R.menu.menu_main) .toolbarListener(toolbarListener).build());

    The working code: optionViews.add(new OptionView.Builder() .normalCard() .image(R.drawable.bus_stop) .title("TITLE") .colorTitle(R.color.colorPrimary) .menuItem(R.menu.menu_main) .toolbarListener(toolbarListener).build());

    Please see that.

    Regards

    opened by atiqueakbani 3
  • com.google.android.gms.maps.MapView not found

    com.google.android.gms.maps.MapView not found

    While compiling i getting this error: /home/alexander/StudioProjects/Ichleihedir/app/build/intermediates/exploded-aar/it.michelelacorte.swipeablecard/library/2.3.0/res/layout/maps_card_layout.xml Error:(10) No resource identifier found for attribute 'liteMode' in package 'de.gvisions.oweapp' Error:(10) No resource identifier found for attribute 'mapType' in package 'de.gvisions.oweapp'

    opened by gruessung 2
  • About setting duration of the card animation showing.

    About setting duration of the card animation showing.

    Hi, michele,

    Thank your for your effort. I have question for you , i am trying to increase the speed of the transition of card showing, i had tried to increase the duration of the card, but it will not effect.

    you had mention the method to set the duration of card setDuration(long duration);

    i had increased the duration , but there is no change in duration it was as same as before.

    please suggest me some thing.

    opened by saggy 2
  • What about using it in fragment ?

    What about using it in fragment ?

    What about using it in fragment ?

    I'm using a FragmentViewPager and a BottomNavigationView. The Card of my fragment start under the BottomNavigationView.

    (The Blue square)

    Thanks you very much !

    EDIT : I Temporaly fixed it by adding a paddingBottom to the content and set the startCArdPosition to 400

    opened by axellebot 1
  • E/Initialization: Option View not initialize!

    E/Initialization: Option View not initialize!

    So, I was trying to take data from a RESTAPI and use your fantastic library.

    but it is giving me the following log and just shows the layout for a sec. I took a video of it and after observation, I can see that the data displayed is correct too. It just displays for 1 second only, may be less

    opened by johnny68 0
  • OnMapReadyCallback?

    OnMapReadyCallback?

    Hello, I've some troubles after adding your library:

    Error:(28, 22) error: cannot access OnMapReadyCallback class file for com.google.android.gms.maps.OnMapReadyCallback not found

    when i do simply

    final OptionView singleSwipe = new OptionView.Builder()
                    .normalCard()
                    .text("Text, a lot of Text, a lot of Text, a lot of Text, a lot of Text, a lot of Text, a lot of Text, a lot of Text, a lot of Text, a lot of Text, a lot of Text," +
                            " a lot of Text, a lot of Text, a lot of Text, a lot of Text, a lot of Text, a lot of Text")
                    .title("Single Card")
                    .build();
    
    
            SwipeableCard swipeableCard = findViewById(R.id.swipeCard);
            swipeableCard.init(this,singleSwipe); 
    
    opened by davidmarinangeli 1
  • Card with custom view in recyclerView

    Card with custom view in recyclerView

    I have card in recyclerview with custom view how to make left and right swipe according two different action?? Is there any suggestion?? i want to swipe from my custom adapter.

    opened by vivek50 0
  • Duplicate dependency error

    Duplicate dependency error

    Hi,

    I am already using compile 'com.google.android.gms:play-services-auth:10.0.1' in my build.gradle nad I have noted that SwipeableCard using com.google.android.gms:play-services-auth:8.4.0

    Here is my compile error I am getting All com.google.android.gms libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 8.4.0, 10.2.1. Examples include com.google.android.gms:play-services:8.4.0 and com.google.android.gms:play-services-auth:10.2.1 less... (Ctrl+F1)

    Do we have any way to override only play-services-auth library gradle?

    opened by mehtaronak 4
Owner
Michele Lacorte
Android developer. Checkout my apps and libraries!
Michele Lacorte
Card with swipe options in Jetpack Compose

SwipeableActionCard Card with swipe options in Jetpack Compose Tutorial: Click Here Import SwipeableActionCard library Add this in project level build

Harsh Mahajan 1 Nov 23, 2021
Rn-scratch-card - React Native Scratch Card which temporarily hides content from user

rn-scratch-card React Native Scratch Card which temporarily hides content from a

Sweatcoin 54 Jan 4, 2023
Created a Tinder like Card Deck & Captain Train like Toolbar

TinderView Created A Simple and Beautiful Tinder like card deck & Captain Train like toolbar. This is heavily based on AndroidSwipeableCardStack, wenc

Aradh Pillai 328 Jun 18, 2022
A tinder like swipeable card stack component

AndroidSwipeableCardStack Change log: provide option to infinitly swipe in a loop card rotation setting card gravity setting undo animation Thanks for

wenchao jiang 824 Nov 10, 2022
This is a android custom view , like a scratch card effect!

ScratchView This is a android custom view , like a scratch card effect! Last Update 采纳DearZack童鞋的优化思路,把计算擦除面积比例的操作放在手指离开屏幕时,以降低对CPU的占用。 Articles Scrat

D_clock爱吃葱花 316 Nov 29, 2022
Android Library to implement simple touch/tap/swipe gestures

SimpleFingerGestures An android library to implement simple 1 or 2 finger gestures easily Example Library The library is inside the libSFG folder Samp

Arnav Gupta 315 Dec 21, 2022
Simple card app for Udacity's Android Basics: User Interface course

just-because-card Simple card app for Udacity's Android Basics: User Interface c

null 0 Jan 6, 2022
A player/ recorder visualizer with the swipe to seek functionality.

iiVisu A player/ recorder visualizer with the swipe to seek functionality. Demo Setup Step 1. Add the JitPack repository to your build file Add it in

Iman Irandoost 126 Nov 25, 2022
Android library which allows you to swipe down from an activity to close it.

Android Sliding Activity Library Easily create activities that can slide vertically on the screen and fit well into the Material Design age. Features

Jake Klinker 1.3k Nov 25, 2022
Android swipe-to-dismiss mini-library and sample code

Android Swipe-to-Dismiss Sample Code Sample code that shows how to make ListView or other views support the swipe-to-dismiss Android UI pattern. See t

Roman Nurik 1.3k Dec 29, 2022
SwipeBack for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swipe gesture

SwipeBack SwipeBack is for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swi

Hannes Dorfmann 697 Dec 14, 2022
A swipe button for Android with a circular progress bar for async operations

ProSwipeButton A swipe button for Android with a circular progress bar for async operations Gradle dependencies { ... compile 'in.shadowfax:pr

Shadowfax Technologies 340 Nov 13, 2022
Android jetpack compose swipe library

Swiper for Android Jetpack Compose Android Jetpack Compose swipe library. Downlo

null 32 Dec 10, 2022
Android Library to build a UI Card

Card Library Travis master: Travis dev: Card Library provides an easy way to display a UI Card using the Official Google CardView in your Android app.

Gabriele Mariotti 4.7k Dec 29, 2022
💳 CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card.

CreditCard View CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card. Displaying and en

Vinay Gaba 769 Dec 14, 2022
PCard Add payment card screen made using JetPack Compose

PCard Add payment card screen made using JetPack Compose Find this repository useful? ❤️ Support it by joining stargazers for this repository. ⭐ And f

Mohamed Elbehiry 61 Dec 16, 2022
Android App to Teach the Card Counting Skill

card-counting Android App to Teach the Card Counting Skill. The skill can be used to make more informed decisions while playing games like Blackjack.

Jamie Flynn 1 Dec 30, 2021
Android Card-Library

Android Card-Library Technology Stack Android Studio Bumblebe

Eraño Payawal 7 Jul 28, 2022
Material Design implementation for Android 4.0+. Shadows, ripples, vectors, fonts, animations, widgets, rounded corners and more.

Carbon Material Design implementation for Android 4.0 and newer. This is not the exact copy of the Lollipop's API and features. It's a custom implemen

null 3k Dec 30, 2022