{"id":21574677,"url":"https://github.com/jintin/composeadapter","last_synced_at":"2026-03-06T10:32:07.837Z","repository":{"id":141913042,"uuid":"195084328","full_name":"Jintin/ComposeAdapter","owner":"Jintin","description":"Compose your Adapter with annotated ViewHolder","archived":false,"fork":false,"pushed_at":"2020-09-12T00:13:58.000Z","size":172,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T16:43:40.101Z","etag":null,"topics":["adapter","android","annotation-processing"],"latest_commit_sha":null,"homepage":"https://jintin.github.io/ComposeAdapter/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jintin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":null,"patreon":"Jintin","open_collective":null,"ko_fi":"Jintin","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-07-03T15:46:17.000Z","updated_at":"2024-11-08T15:18:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"e464acaf-bd15-4618-a0f6-102900c55720","html_url":"https://github.com/Jintin/ComposeAdapter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jintin/ComposeAdapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jintin%2FComposeAdapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jintin%2FComposeAdapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jintin%2FComposeAdapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jintin%2FComposeAdapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jintin","download_url":"https://codeload.github.com/Jintin/ComposeAdapter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jintin%2FComposeAdapter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30171869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","annotation-processing"],"created_at":"2024-11-24T12:10:44.293Z","updated_at":"2026-03-06T10:32:07.714Z","avatar_url":"https://github.com/Jintin.png","language":"Kotlin","funding_links":["https://patreon.com/Jintin","https://ko-fi.com/Jintin"],"categories":[],"sub_categories":[],"readme":"# ComposeAdapter\n[![CircleCI](https://circleci.com/gh/Jintin/ComposeAdapter.svg?style=shield)](https://circleci.com/gh/Jintin/ComposeAdapter)\n[![Download](https://api.bintray.com/packages/jintin/maven/ComposeAdapter-Compiler/images/download.svg)](https://bintray.com/jintin/maven/ComposeAdapter-Compiler/_latestVersion)\n[![Download](https://api.bintray.com/packages/jintin/maven/ComposeAdapter/images/download.svg)](https://bintray.com/jintin/maven/ComposeAdapter/_latestVersion)\n\nComposeAdapter is an Android tool to compose your Adapter with various ViewHolder by simple Annotations.\n\n## Install\n\n```groovy\nimplementation 'com.github.jintin:composeadapter:0.1.0'\nkapt 'com.github.jintin:composeadapter-compiler:0.1.0'\n\n```\n\n## Usage\n\n1. Add `@BindHolder` annotation to your Adapter with layout and model information.\n    - You can also mark `@BindLayout` to your ViewHolder with layout id so adapter side can omit.\n2. Change your super class to auto-generated class, name will as same as your current class name plus \"Helper\".\n```kotlin\n@BindHolder(ViewHolder1::class)\n@BindHolder(ViewHolder2::class, R.layout.item_holder2)\nclass SampleAdapter(private val list: List\u003cString\u003e) : SampleAdapterHelper() {\n    //...\n}\n@BindLayout(R.layout.item_holder1)\nclass ViewHolder1(itemView: View) : RecyclerView.ViewHolder(itemView) {\n    //...\n}\nclass ViewHolder2(itemView: View) : RecyclerView.ViewHolder(itemView) {\n    //...\n}\n```\n\n3.  Build project, the related `onCreateViewHolder` method will be created in the auto-generated super class with static viewType int for further usage.\n```java\npublic abstract class SampleAdapterHelper extends RecyclerView.Adapter\u003cRecyclerView.ViewHolder\u003e {\n  protected static final int TYPE_VIEW_HOLDER1 = 0;\n\n  protected static final int TYPE_VIEW_HOLDER2 = 1;\n\n  @Override\n  public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n    switch (viewType) {\n      case TYPE_VIEW_HOLDER1: {\n        View view = LayoutInflater.from(parent.getContext()).inflate(2131296285, parent, false);\n        return new ViewHolder1(view);\n      }\n      case TYPE_VIEW_HOLDER2: {\n        View view = LayoutInflater.from(parent.getContext()).inflate(2131296286, parent, false);\n        return new ViewHolder2(view);\n      }\n      default: throw new RuntimeException(\"Not support type\" + viewType);\n    }\n  }\n}\n\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at \u003chttps://github.com/Jintin/ComposeAdapter\u003e.\n\n## License\n\nThe module is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjintin%2Fcomposeadapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjintin%2Fcomposeadapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjintin%2Fcomposeadapter/lists"}