{"id":13537835,"url":"https://github.com/kikoso/Swipeable-Cards","last_synced_at":"2025-04-02T04:31:54.471Z","repository":{"id":16985996,"uuid":"19748926","full_name":"kikoso/Swipeable-Cards","owner":"kikoso","description":"A native library providing a Tinder-like cards effect. A card can be constructed using an image and displayed with animation effects, dismiss-to-like and dismiss-to-unlike, and use different sorting mechanisms.","archived":false,"fork":false,"pushed_at":"2020-11-16T03:25:54.000Z","size":1590,"stargazers_count":1472,"open_issues_count":42,"forks_count":364,"subscribers_count":74,"default_branch":"develop","last_synced_at":"2025-04-01T10:08:53.016Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Popesites/kilometersMilesConversion","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kikoso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-13T17:34:06.000Z","updated_at":"2025-03-30T00:20:37.000Z","dependencies_parsed_at":"2022-09-26T04:10:11.331Z","dependency_job_id":null,"html_url":"https://github.com/kikoso/Swipeable-Cards","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikoso%2FSwipeable-Cards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikoso%2FSwipeable-Cards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikoso%2FSwipeable-Cards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikoso%2FSwipeable-Cards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kikoso","download_url":"https://codeload.github.com/kikoso/Swipeable-Cards/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246757525,"owners_count":20828914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T09:01:04.152Z","updated_at":"2025-04-02T04:31:54.438Z","avatar_url":"https://github.com/kikoso.png","language":"Java","funding_links":[],"categories":["Java","Card"],"sub_categories":[],"readme":"Swipeable cards: Tinder-like cards library for Android\n=================\n\nSwipeable-cards is a native library for Android that provide a Tinder card like effect. A card can be constructed using an image and displayed with animation effects, dismiss-to-like and dismiss-to-unlike, and use different sorting mechanisms.\n\nThe library is compatible for Android versions 4.4 (API Level 19) and upwards.\n\nA [library][1] and a [sample application][2] are provided with the code.\n\n![Example Image][3]\n![Example Image][4]\n\n\nUsage\n--------------------\nDownload the library with git and import it into your project (right now there is only Gradle support, so you need to import it writing in your build.gradle the following:\n\n```groovy\ncompile project(':AndTinder')\n```\n\nand in your settings.gradle\n\n```groovy\ninclude 'AndTinder'\n```\n\nYou can also download it via MavenCentral and Gradle:\n\n```groovy\ndependencies {\n   compile 'com.github.kikoso:SwipeableCards:1.1-RELEASE@aar'\n}\n```\n\nWhen you have included the library in your project, you need to proceeed as follows. First, create a container to store the cards.\n\n```xml\n\u003ccom.andtinder.view.CardContainer \n     xmlns:android=\"http://schemas.android.com/apk/res/android\"\n     android:id=\"@+id/layoutview\"\n     android:layout_width=\"fill_parent\"\n     android:layout_height=\"fill_parent\" /\u003e\n```\n    \nFrom your Activity, inflate into a CardContainer the container you declared in your XML\n    \n```java\nmCardContainer = (CardContainer) findViewById(R.id.layoutview);\n```\n\nThe card container can sort the cards either ordered or disordered:\n\n```java\nmCardContainer.setOrientation(Orientation.Ordered);\nmCardContainer.setOrientation(Orientation.Disordered);\n```\n     \nNow you need to create your cards. The procedure is quite simple: you just need to create an object CardView and provide the image resource you want to add:\n\n```java\nCardModel card = new CardModel(\"Title1\", \"Description goes here\", r.getDrawable(R.drawable.picture1);\n```\n    \nAdditionally, you can set up a Delegate to be notified when the image is being liked or disliked:\n     \n```java\ncard.setOnCardDimissedListener(new CardModel.OnCardDismissedListener() {\n     @Override\n     public void onLike() {\n          Log.d(\"Swipeable Card\", \"I liked it\");\n     }\n\n     @Override\n     public void onDislike() {\n          Log.d(\"Swipeable Card\", \"I did not liked it\");\n     }\n});\n```\n\nOr when it is clicked:\n\n```java\ncard.setOnClickListener(new CardModel.OnClickListener() {\n     @Override\n     public void OnClickListener() {\n          Log.i(\"Swipeable Cards\",\"I am pressing the card\");\n     }\n});\n```\n\nFinally, use an adapter to link the cards and the container:\n\n```java\nSimpleCardStackAdapter adapter = new SimpleCardStackAdapter(this);\nadapter.add(new CardModel(\"Title1\", \"Description goes here\", r.getDrawable(R.drawable.picture1)));\nmCardContainer.setAdapter(adapter);\n```   \n\nVersion history\n--------------------\n*  28.01.2020: Version 0.4: Migration to AndroidX, libraries updated.\n*  14.02.2015: Version 0.3: Fixed bugs with the cards locations and updated to the latest build tools.\n*  4.06.2014: Published the version 0.2 with several improvements thanks to [Dr-Emann][5].\n* 13.05.2014: Published the first version 0.1.\n\nNext steps\n--------------------\nThere are many things that can be done with this library. \n\n* Allow custom templates\n* Extend image personalization options\n* Recreate the container when it has been emptied\n\nIf you want to colaborate with the project or have any idea to be implemented feel free to submit a pull request or to write an issue! \n\nAlso, if you have used AndTinder on your app and you let me know, I can link it from here :)\n\nContact\n--------------------\n\nEnrique López Mañas - \u003ceenriquelopez@gmail.com\u003e\n\nLicense\n-------\n\n    Copyright 2020 Enrique López Mañas\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n\u003ca href=\"https://twitter.com/eenriquelopez\"\u003e\n  \u003cimg alt=\"Follow me on Twitter\"\n       src=\"https://raw.github.com/kikoso/android-stackblur/master/art/twitter.png\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://plus.google.com/103250453274111396206\"\u003e\n  \u003cimg alt=\"Follow me on Google+\"\n       src=\"https://raw.github.com/kikoso/android-stackblur/master/art/google-plus.png\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"http://de.linkedin.com/pub/enrique-l%C3%B3pez-ma%C3%B1as/15/4a9/876\"\u003e\n  \u003cimg alt=\"Follow me on LinkedIn\"\n       src=\"https://raw.github.com/kikoso/android-stackblur/master/art/linkedin.png\" /\u003e\n\n[1]: https://github.com/kikoso/AndTinder/tree/master/AndTinder\n[2]: https://github.com/kikoso/AndTinder/tree/master/AndTinderDemo\n[3]: https://raw.github.com/kikoso/AndTinder/master/art/captura1.png\n[4]: https://raw.github.com/kikoso/AndTinder/master/art/captura2.png\n[5]: https://github.com/Dr-Emann\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikoso%2FSwipeable-Cards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkikoso%2FSwipeable-Cards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikoso%2FSwipeable-Cards/lists"}