{"id":19508691,"url":"https://github.com/commit451/firestoreadapter","last_synced_at":"2025-08-19T23:07:47.995Z","repository":{"id":83213985,"uuid":"116067200","full_name":"Commit451/FirestoreAdapter","owner":"Commit451","description":"RecyclerView Adapter for Firebase Firestore","archived":false,"fork":false,"pushed_at":"2022-06-27T04:31:15.000Z","size":149,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-26T02:52:44.468Z","etag":null,"topics":["android","firebase","firestore","kotlin","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Commit451.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,"zenodo":null}},"created_at":"2018-01-02T23:15:31.000Z","updated_at":"2024-02-21T05:33:35.000Z","dependencies_parsed_at":"2023-03-01T20:31:26.006Z","dependency_job_id":null,"html_url":"https://github.com/Commit451/FirestoreAdapter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Commit451/FirestoreAdapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commit451%2FFirestoreAdapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commit451%2FFirestoreAdapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commit451%2FFirestoreAdapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commit451%2FFirestoreAdapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Commit451","download_url":"https://codeload.github.com/Commit451/FirestoreAdapter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commit451%2FFirestoreAdapter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271236280,"owners_count":24723978,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android","firebase","firestore","kotlin","recyclerview"],"created_at":"2024-11-10T23:09:00.541Z","updated_at":"2025-08-19T23:07:47.968Z","avatar_url":"https://github.com/Commit451.png","language":"Kotlin","readme":"# FirestoreAdapter\n\n[![Build Status](https://travis-ci.org/Commit451/FirestoreAdapter.svg?branch=master)](https://travis-ci.org/Commit451/FirestoreAdapter) [![](https://jitpack.io/v/Commit451/FirestoreAdapter.svg)](https://jitpack.io/#Commit451/FirestoreAdapter)\n\nRecyclerView Adapter for Firebase Firestore\n\n## Usage\nStart by subclassing FirestoreAdapter:\n```kotlin\nclass ItemAdapter(creator: QueryCreator) : FirestoreAdapter\u003cState, ItemViewHolder\u003e(State::class.java, creator) {\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemViewHolder {\n        return ItemViewHolder.inflate(parent)\n    }\n\n    override fun onBindViewHolder(holder: ItemViewHolder, position: Int) {\n        holder.bind(get(position))\n    }\n}\n```\nUsage will look like so:\n```kotlin\nval firestore = FirebaseFirestore.getInstance()\nval ref = firestore.collection(\"states\")\nadapter = ItemAdapter({\n    ref.limit(10)\n            .orderBy(\"name\")\n})\n\nval list = findViewById\u003cRecyclerView\u003e(R.id.list)\nval layoutManager = LinearLayoutManager(this)\nlist.adapter = adapter\nlist.layoutManager = layoutManager\n//this allows for endless scrolling\nadapter.setupOnScrollListener(list, layoutManager)\n```\n\n## Limitations\n- Items added to a collection after queries have been started will always be added to the bottom of the list. This is due to the fact that we cannot know which query the document change originates from.\n- If an items position changes in the list, it will not update, only the data will. We cannot associate the changed item with the right spot in the list since it differs from the spot in the query\n\nLicense\n--------\n\n    Copyright 2018 Commit 451\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%2Fcommit451%2Ffirestoreadapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommit451%2Ffirestoreadapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommit451%2Ffirestoreadapter/lists"}