{"id":13642640,"url":"https://github.com/blipinsk/RecyclerViewHeader","last_synced_at":"2025-04-20T20:32:21.752Z","repository":{"id":29733810,"uuid":"33277109","full_name":"blipinsk/RecyclerViewHeader","owner":"blipinsk","description":"[DEPRECATED] Super fast and easy way to create header for Android RecyclerView","archived":true,"fork":false,"pushed_at":"2020-01-06T13:40:05.000Z","size":262,"stargazers_count":1298,"open_issues_count":0,"forks_count":262,"subscribers_count":37,"default_branch":"master","last_synced_at":"2024-11-09T14:37:58.539Z","etag":null,"topics":["android","java","recyclerview"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"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/blipinsk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-04-01T22:50:38.000Z","updated_at":"2024-11-02T04:49:57.000Z","dependencies_parsed_at":"2022-08-07T14:30:42.153Z","dependency_job_id":null,"html_url":"https://github.com/blipinsk/RecyclerViewHeader","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blipinsk%2FRecyclerViewHeader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blipinsk%2FRecyclerViewHeader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blipinsk%2FRecyclerViewHeader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blipinsk%2FRecyclerViewHeader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blipinsk","download_url":"https://codeload.github.com/blipinsk/RecyclerViewHeader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249958826,"owners_count":21351720,"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":["android","java","recyclerview"],"created_at":"2024-08-02T01:01:34.300Z","updated_at":"2025-04-20T20:32:21.505Z","avatar_url":"https://github.com/blipinsk.png","language":"Java","funding_links":[],"categories":["RecyclerView","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# DEPRECATED\n\nI created this library back in the day when I thought RecyclerView was all new and difficult. Writing an adapter that could inflate multiple types of Views seemed like a difficult job to do. In reality, `RecyclerViewHeader` is just a complex solution to a simple problem.\nInstead of using this library, just learn how to create a multi-type `RecyclerView.Adapter`. It will bring you a lot of value in the long run, and it is not difficult at all. Check the `Migration` section for the simplest example of such `Adapter.`\n\n**No new development will be taking place.**\n\nThanks for all the support!\n\n------\n\nRecyclerViewHeader\n------------------\n\n[![License](https://img.shields.io/github/license/blipinsk/RecyclerViewHeader.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Maven Central](https://img.shields.io/maven-central/v/com.bartoszlipinski/recyclerviewheader2.svg)](http://gradleplease.appspot.com/#recyclerviewheader2)\n\nIf you still wanna use this library, check the old [README.md](https://github.com/blipinsk/RecyclerViewHeader/blob/2a0679f7abcb8cb94e3985272cf19bde90c6cbe4/README.md).\n\nMigration\n---------\n**Just use a `RecyclerView.Adapter` that can inflate multiple types of items.**\n\nHere's the simplest one you could use:\n\n```kotlin\nclass ExampleAdapter : RecyclerView.Adapter\u003cRecyclerView.ViewHolder\u003e() {\n\n    companion object {\n        private const val VIEW_TYPE_HEADER = 4815\n        private const val VIEW_TYPE_ITEM = 1623\n    }\n\n    private val itemDataSetSize: Int get() = TODO(\"provide the size of your `ITEM` dataset\")\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {\n        when (viewType) {\n            VIEW_TYPE_HEADER -\u003e TODO(\"create your HEADER ViewHolder\")\n            VIEW_TYPE_ITEM -\u003e TODO(\"create your ITEM ViewHolder\")\n            else -\u003e error(\"Unhandled viewType=$viewType\")\n        }\n    }\n\n    override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {\n        when (val viewType = getItemViewType(position)) {\n            VIEW_TYPE_HEADER -\u003e TODO(\"bind your HEADER ViewHolder\")\n            VIEW_TYPE_ITEM -\u003e TODO(\"bind your ITEM ViewHolder\")\n            else -\u003e error(\"Unhandled viewType=$viewType\")\n        }\n    }\n\n    override fun getItemCount(): Int = itemDataSetSize + 1 // 1 for header\n\n    override fun getItemViewType(position: Int) = when (position) {\n        0 -\u003e VIEW_TYPE_HEADER\n        else -\u003e VIEW_TYPE_ITEM\n    }\n}\n\n```\n\n\nDeveloped by\n============\n * Bartosz Lipiński\n\nLicense\n=======\n\n    Copyright 2015 Bartosz Lipiński\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 [1]: https://github.com/Karumi/HeaderRecyclerView\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblipinsk%2FRecyclerViewHeader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblipinsk%2FRecyclerViewHeader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblipinsk%2FRecyclerViewHeader/lists"}