{"id":13786911,"url":"https://github.com/bloderxd/deck","last_synced_at":"2025-04-14T15:33:17.519Z","repository":{"id":144158237,"uuid":"112870086","full_name":"bloderxd/deck","owner":"bloderxd","description":null,"archived":false,"fork":false,"pushed_at":"2018-12-24T11:20:02.000Z","size":151,"stargazers_count":52,"open_issues_count":5,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T04:41:56.570Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bloderxd.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-12-02T19:21:44.000Z","updated_at":"2023-03-17T06:08:49.000Z","dependencies_parsed_at":"2023-06-13T21:09:31.703Z","dependency_job_id":null,"html_url":"https://github.com/bloderxd/deck","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloderxd%2Fdeck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloderxd%2Fdeck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloderxd%2Fdeck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloderxd%2Fdeck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bloderxd","download_url":"https://codeload.github.com/bloderxd/deck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248906790,"owners_count":21181217,"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-03T20:00:21.455Z","updated_at":"2025-04-14T15:33:17.014Z","avatar_url":"https://github.com/bloderxd.png","language":"Kotlin","funding_links":[],"categories":["Library"],"sub_categories":[],"readme":"# Deck\n\n![alt_tag](https://bloximages.chicago2.vip.townnews.com/journaltimes.com/content/tncms/assets/v3/editorial/4/48/4484cfa4-e685-5fb8-9b05-3d3df399ac06/57838be8937b3.image.jpg)\n\n# What is it?\n\nDeck is a library that permits you to apply a beautiful animation in your view pager, and this animations looks like a deck... yeah, I'm not good with names.\n\n![alt_tag](https://media.giphy.com/media/l4EpiKjC1H2sQCVva/giphy.gif)\n\n# How does it works?\n\nFirst of all you need to declare it in your layout xml file\n\n```xml\n\u003ccom.example.lib.Deck\n        android:id=\"@+id/deck_pager\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"/\u003e\n```\nThen you can set the padding(Optional)\n\n```kotlin\nprivate val deckPager by lazy { activity.findViewById\u003cDeck\u003e(R.id.deck_pager) }\n```\n\nSet padding based on percentage of the screen width\n\n```kotlin\ndeckPager.setPercentagePadding(activity, 8)\n```\n\nor set padding based on dp value\n\n```kotlin\ndeckPager.setDpPadding(activity, 16)\n```\n\n##### Remember you can set all other view pager properties with deck\n\n# Deck properties\n\nThese are all properties supported in deck's xml\n\n```xml\n\u003ccom.example.lib.Deck\n        android:id=\"@+id/deck_pager\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:padding_percentage=\"8\"\n        app:padding_dp=\"16dp\"/\u003e\n```\n\n# Import\n\nAdd JitPack maven repository reference in your project\n\n```groovy\nrepositories {\n    maven { url 'https://jitpack.io' }\n}\n```\n\nthen add deck reference in your gradle dependencies\n\n##### Gradle\n\n```groovy\ndependencies {\n    compile 'com.github.bloderxd:deck:0.1'\n}\n```\n\n##### Gradle v3.0+\n```groovy\ndependencies {\n    implementation 'com.github.bloderxd:deck:0.1'\n}\n```\n\n# License\n\n```\nMIT License\n\nCopyright (c) 2017 Bloder\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloderxd%2Fdeck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbloderxd%2Fdeck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloderxd%2Fdeck/lists"}