{"id":18034789,"url":"https://github.com/defuj/recyclerviewsnap-master","last_synced_at":"2025-04-04T23:12:59.602Z","repository":{"id":157127041,"uuid":"166026779","full_name":"defuj/RecyclerViewSnap-Master","owner":"defuj","description":null,"archived":false,"fork":false,"pushed_at":"2019-01-16T11:16:16.000Z","size":8259,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T07:30:46.706Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/defuj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-16T11:12:38.000Z","updated_at":"2020-07-24T11:48:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"1ccecce9-84ee-41cf-8377-01e1f190fa55","html_url":"https://github.com/defuj/RecyclerViewSnap-Master","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuj%2FRecyclerViewSnap-Master","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuj%2FRecyclerViewSnap-Master/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuj%2FRecyclerViewSnap-Master/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuj%2FRecyclerViewSnap-Master/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/defuj","download_url":"https://codeload.github.com/defuj/RecyclerViewSnap-Master/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247261605,"owners_count":20910108,"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-10-30T11:14:03.672Z","updated_at":"2025-04-04T23:12:59.595Z","avatar_url":"https://github.com/defuj.png","language":"Java","readme":"# RecyclerViewSnap\n\nRecyclerView snapping example with SnapHelper\n\n\u003cimg src=\"screens/snap_googleplay.gif\" width=300\u003e\u003c/img\u003e   \u003cimg src=\"screens/snap_final.gif\" width=300\u003e\u003c/img\u003e\n\n## How to\n\nIf you need snapping support to start, top, end or bottom, use GravitySnapHelper.\n\nAdd this to your build.gradle:\n\n```groovy\nimplementation 'com.github.rubensousa:gravitysnaphelper:1.5'\n```\n\nOtherwise, center snapping is done with LinearSnapHelper (part of the recyclerview-v7 package).\n\n### Snapping center:\n\n```java\nSnapHelper snapHelper = new LinearSnapHelper();\nsnapHelper.attachToRecyclerView(recyclerView);\n```\n\n### Snapping start with GravitySnapHelper:\n\n```java\nstartRecyclerView.setLayoutManager(new LinearLayoutManager(this,\n                LinearLayoutManager.HORIZONTAL, false));\n                \nSnapHelper snapHelperStart = new GravitySnapHelper(Gravity.START);\nsnapHelperStart.attachToRecyclerView(startRecyclerView);\n```\n\n### Snapping top with GravitySnapHelper:\n\n```java\ntopRecyclerView.setLayoutManager(new LinearLayoutManager(this));\n                \nSnapHelper snapHelperTop = new GravitySnapHelper(Gravity.TOP);\nsnapHelperTop.attachToRecyclerView(topRecyclerView);\n```\n\n## License\n\n    Copyright 2016 The Android Open Source Project\n    Copyright 2016 Rúben Sousa\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefuj%2Frecyclerviewsnap-master","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefuj%2Frecyclerviewsnap-master","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefuj%2Frecyclerviewsnap-master/lists"}