{"id":22559617,"url":"https://github.com/random-guys/rv","last_synced_at":"2026-04-30T17:31:16.405Z","repository":{"id":98969751,"uuid":"202603524","full_name":"random-guys/rv","owner":"random-guys","description":"Custom RecyclerView Adapter","archived":false,"fork":false,"pushed_at":"2019-09-11T12:14:19.000Z","size":136,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T12:11:59.984Z","etag":null,"topics":["adapter","android","infinite-scroll","library","loadmore","recyclerview"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/random-guys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-08-15T19:58:19.000Z","updated_at":"2019-11-14T13:53:44.000Z","dependencies_parsed_at":"2023-04-16T08:47:16.389Z","dependency_job_id":null,"html_url":"https://github.com/random-guys/rv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/random-guys/rv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-guys%2Frv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-guys%2Frv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-guys%2Frv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-guys%2Frv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/random-guys","download_url":"https://codeload.github.com/random-guys/rv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-guys%2Frv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32472396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["adapter","android","infinite-scroll","library","loadmore","recyclerview"],"created_at":"2024-12-07T21:07:41.857Z","updated_at":"2026-04-30T17:31:16.387Z","avatar_url":"https://github.com/random-guys.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rv\n`rv` is a custom recyclerView adapter that enables `infinite scroll` by default and `load more` capabilities.\n\n![Demo](https://media.giphy.com/media/m9SYyx6t1E2le1DM0e/giphy.gif)\n\n## Installation\n\n Add the dependency : \n```gradle\ndependencies {\n    implementation 'com.random-guys:rv:0.0.1'\n}\n```\n\n## Usage\n\n```kotlin\nclass MainActivity : AppCompatActivity(), LoadMoreListener {\n\n    private val faker = Faker()\n    private var theNames = ArrayList\u003cString\u003e()\n    private lateinit var namesAdapter: NamesAdapter\n    private lateinit var linearLayoutManager: LinearLayoutManager\n    private lateinit var recyclerScrollMoreListener: RecyclerScrollMoreListener\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        namesAdapter = NamesAdapter(this)\n        namesAdapter.loadMoreListener = this\n\n        for (i in 0 until 1000) theNames.add(faker.name().nameWithMiddle())\n\n        namesAdapter.add(theNames.subList(0, 20))\n\n        linearLayoutManager = LinearLayoutManager(this)\n\n        recyclerView.layoutManager = linearLayoutManager\n        recyclerView.adapter = namesAdapter\n\n        recyclerScrollMoreListener = RecyclerScrollMoreListener(linearLayoutManager, namesAdapter)\n        recyclerView.addOnScrollListener(recyclerScrollMoreListener)\n    }\n\n    override fun onLoadMore(page: Int, total: Int) {\n        if (theNames.size \u003e= total) {\n            namesAdapter.add(theNames.subList(page * 10, (page * 10) + 10))\n            recyclerView.post { namesAdapter.notifyItemInserted(namesAdapter.itemCount) }\n        }\n    }\n}\n```\n\n## Contribution\nThe `BaseViewHolder` class can be extended to support multiple view types.\n\n```\nCopyright (c) 2019 Random Guys\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandom-guys%2Frv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandom-guys%2Frv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandom-guys%2Frv/lists"}