{"id":13396136,"url":"https://github.com/yqritc/RecyclerView-MultipleViewTypesAdapter","last_synced_at":"2025-03-13T22:31:45.513Z","repository":{"id":29246177,"uuid":"32778446","full_name":"yqritc/RecyclerView-MultipleViewTypesAdapter","owner":"yqritc","description":"Android library defining adapter classes of RecyclerView to manage multiple view types","archived":false,"fork":false,"pushed_at":"2018-05-03T21:01:34.000Z","size":4559,"stargazers_count":413,"open_issues_count":3,"forks_count":93,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-10-15T10:16:30.824Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/yqritc.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}},"created_at":"2015-03-24T05:39:35.000Z","updated_at":"2024-09-14T02:13:08.000Z","dependencies_parsed_at":"2022-09-03T07:52:01.036Z","dependency_job_id":null,"html_url":"https://github.com/yqritc/RecyclerView-MultipleViewTypesAdapter","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/yqritc%2FRecyclerView-MultipleViewTypesAdapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yqritc%2FRecyclerView-MultipleViewTypesAdapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yqritc%2FRecyclerView-MultipleViewTypesAdapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yqritc%2FRecyclerView-MultipleViewTypesAdapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yqritc","download_url":"https://codeload.github.com/yqritc/RecyclerView-MultipleViewTypesAdapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243493891,"owners_count":20299734,"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-07-30T18:00:41.110Z","updated_at":"2025-03-13T22:31:44.740Z","avatar_url":"https://github.com/yqritc.png","language":"Java","funding_links":[],"categories":["Index `(light-weight pages)`","Index","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# RecyclerView-MultipleViewTypeAdapter\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-MultipleViewTypesAdapter-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/1703)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Download](https://api.bintray.com/packages/yqritc/maven/recyclerview-multiple-viewtypes-adapter/images/download.svg)](https://bintray.com/yqritc/maven/recyclerview-multiple-viewtypes-adapter/_latestVersion)\n\nRecyclerView adapter classes for managing multiple view types\n\n ![Sample](/sample/sample.gif)\n\n# Release Note\n\n[Release Note] (https://github.com/yqritc/RecyclerView-MultipleViewTypesAdapter/releases)\n\n# Gradle\n```\nrepositories {\n    jcenter()\n}\n\ndependencies {\n    compile 'com.yqritc:recyclerview-multiple-viewtypes-adapter:1.1.0'\n}\n```\n\n# About this library\n\nThe standard way to handle view creation and data binding logics for RecyclerView is to define the single adapter class extending RecyclerView.Adapter.  \nIf you need to handle simple view type, you will not get in trouble.  \nBut if you need to handle the multiple complex view types, writing logic in single adapter class causes unmaintainable source code.  \nSo, this library separates the logic for each view type into single class (DataBinder), and change the role of adapter class (DataBindAdapter) to manage these DataBinder classes.  \nBy using this library, the implementation would be simple and clear, and also source code for each view type would be maintenable and reusable.  \n\n\n# Usage\n\n### 1. Create DataBinder\nDefine class extending DataBinder for each view type.  \nDataBinder class is used to bind view and data.  \n\nPlease refer the [binder samples](/sample/src/main/java/com/yqritc/recyclerviewmultipleviewtypesadapter/sample/binder) for usage.\n\n### 2. Create DataBindAdapter\nCreate adapter class to manage DataBinder classes.  \nUse (or extend) ListBindAdapter (or EnumListBindAdapter) if the order of view types used for recyclerview is in sequence.\nIf the order of view types is complex, create class by extending EnumMapBindAdapter or DataBindAdapter.  \n\nPlease refer the [adapter samples](/sample/src/main/java/com/yqritc/recyclerviewmultipleviewtypesadapter/sample/adapter) for usage.\n\n### 3. Set adapter for recyclerview\n\n\n# License\n```\nCopyright 2015 yqritc\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%2Fyqritc%2FRecyclerView-MultipleViewTypesAdapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyqritc%2FRecyclerView-MultipleViewTypesAdapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyqritc%2FRecyclerView-MultipleViewTypesAdapter/lists"}