{"id":13606226,"url":"https://github.com/LDRAlighieri/Corbind","last_synced_at":"2025-04-12T08:30:41.481Z","repository":{"id":38239328,"uuid":"201738972","full_name":"LDRAlighieri/Corbind","owner":"LDRAlighieri","description":"⚡ Kotlin Coroutines binding APIs for Android UI widgets from the platform and support libraries","archived":false,"fork":false,"pushed_at":"2025-04-09T19:43:38.000Z","size":29806,"stargazers_count":527,"open_issues_count":4,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-09T20:37:32.092Z","etag":null,"topics":["activity","android","android-library","android-ui-widgets","appcompat","binding","coroutines","drawerlayout","flow","fragment","kotlin","kotlin-coroutines","kotlin-extensions","kotlin-library","material","recyclerview","swiperefreshlayout","ui","viewpager","widget"],"latest_commit_sha":null,"homepage":"https://ldralighieri.github.io/Corbind","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/LDRAlighieri.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-11T08:36:11.000Z","updated_at":"2025-04-09T19:43:10.000Z","dependencies_parsed_at":"2024-05-10T10:38:47.469Z","dependency_job_id":"ba7f7b7d-c027-49bb-80d6-ad2f02b9b302","html_url":"https://github.com/LDRAlighieri/Corbind","commit_stats":{"total_commits":339,"total_committers":5,"mean_commits":67.8,"dds":0.0471976401179941,"last_synced_commit":"399e6ea91530caa7a4cfeb94307b24aac3c7e735"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LDRAlighieri%2FCorbind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LDRAlighieri%2FCorbind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LDRAlighieri%2FCorbind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LDRAlighieri%2FCorbind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LDRAlighieri","download_url":"https://codeload.github.com/LDRAlighieri/Corbind/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248539753,"owners_count":21121228,"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":["activity","android","android-library","android-ui-widgets","appcompat","binding","coroutines","drawerlayout","flow","fragment","kotlin","kotlin-coroutines","kotlin-extensions","kotlin-library","material","recyclerview","swiperefreshlayout","ui","viewpager","widget"],"created_at":"2024-08-01T19:01:07.287Z","updated_at":"2025-04-12T08:30:36.466Z","avatar_url":"https://github.com/LDRAlighieri.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"﻿[![Corbind](logo.svg)](https://ldralighieri.github.io/Corbind)\n\n[![Kotlin Version](https://img.shields.io/badge/Kotlin-v1.9.23-blue.svg?logo=kotlin)](https://kotlinlang.org)\n[![Kotlin Coroutines Version](https://img.shields.io/badge/Coroutines-v1.8.0-blue.svg)](https://kotlinlang.org/docs/reference/coroutines-overview.html)\n[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a1c9a1b1d1ce4ca7a201ab93492bf6e0)](https://app.codacy.com/gh/LDRAlighieri/Corbind)\n[![API](https://img.shields.io/badge/API-19%2B-brightgreen.svg)](https://android-arsenal.com/api?level=19)\n[![Publish status](https://github.com/LDRAlighieri/Corbind/actions/workflows/publish.yml/badge.svg)](https://github.com/LDRAlighieri/Corbind/actions)\n\n[![Google Dev Library](https://img.shields.io/badge/Google_DevLibrary-Corbind-blue)](https://devlibrary.withgoogle.com/products/android/repos/LDRAlighieri-Corbind)\n[![Android Weekly](https://androidweekly.net/issues/issue-377/badge)](https://androidweekly.net/issues/issue-377)\n\n\u003cbr\u003e\n\n⚡ Kotlin Coroutines binding APIs for Android UI widgets from the platform and support libraries. **Supports Flow, ReceiveChannel and Actor**.\n\n\n## Description\n\nThis library is for Android applications only. Help you to transform Android UI events into cold [Flow][flow], hot [ReceiveChannel][channel] or just perform an action through an [Actor][actor].  \nPlease consider giving this repository a star ⭐ if you like the project.\n\n\n## Articles\n* [⚡ Kotlin Coroutine binding with Flow support][kotlin-coroutine-binding]\n* [What’s up Corbind! Release 1.7.0 🎉. It’s been a long road][release-1.7.0]\n\n\n## Current versions\n\n| Module                       | Version                                                                                                                                                                                                  |\n|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [corbind-bom]                | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-bom.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-bom)                               |\n| [corbind]                    | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind)                                       |\n| [corbind-activity]           | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-activity.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-activity)                     |\n| [corbind-appcompat]          | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-appcompat.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-appcompat)                   |\n| [corbind-core]               | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-core.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-core)                             |\n| [corbind-drawerlayout]       | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-drawerlayout.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-drawerlayout)             |\n| [corbind-fragment]           | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-fragment.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-fragment)                     |\n| [corbind-leanback]           | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-leanback.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-leanback)                     |\n| [corbind-lifecycle]          | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-lifecycle.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-lifecycle)                   |\n| [corbind-material]           | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-material.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-material)                     |\n| [corbind-navigation]         | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-navigation.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-navigation)                 |\n| [corbind-recyclerview]       | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-recyclerview.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-recyclerview)             |\n| [corbind-slidingpanelayout]  | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-slidingpanelayout.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-slidingpanelayout)   |\n| [corbind-swiperefreshlayout] | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-swiperefreshlayout.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-swiperefreshlayout) |\n| [corbind-viewpager]          | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-viewpager.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-viewpager)                   |\n| [corbind-viewpager2]         | [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind-viewpager2.svg)](https://mvnrepository.com/artifact/ru.ldralighieri.corbind/corbind-viewpager2)                 |\n\n\n## Using in your projects\n\nPlatform bindings:\n```kotlin\ndependencies { \n    implementation(platform(\"ru.ldralighieri.corbind:corbind-bom:2024.01.00\"))\n    implementation(\"ru.ldralighieri.corbind:corbind\")\n}\n```\n\nAndroidX library bindings:\n```kotlin\ndependencies { \n    implementation(platform(\"ru.ldralighieri.corbind:corbind-bom:2024.01.00\"))\n    implementation(\"ru.ldralighieri.corbind:corbind-activity\")\n    implementation(\"ru.ldralighieri.corbind:corbind-appcompat\")\n    implementation(\"ru.ldralighieri.corbind:corbind-core\")\n    implementation(\"ru.ldralighieri.corbind:corbind-drawerlayout\")\n    implementation(\"ru.ldralighieri.corbind:corbind-fragment\")\n    implementation(\"ru.ldralighieri.corbind:corbind-leanback\")\n    implementation(\"ru.ldralighieri.corbind:corbind-lifecycle\")\n    implementation(\"ru.ldralighieri.corbind:corbind-navigation\")\n    implementation(\"ru.ldralighieri.corbind:corbind-recyclerview\")\n    implementation(\"ru.ldralighieri.corbind:corbind-slidingpanelayout\")\n    implementation(\"ru.ldralighieri.corbind:corbind-swiperefreshlayout\")\n    implementation(\"ru.ldralighieri.corbind:corbind-viewpager\")\n    implementation(\"ru.ldralighieri.corbind:corbind-viewpager2\")\n}\n```\n\nGoogle 'material' library bindings:\n```kotlin\ndependencies { \n    implementation(platform(\"ru.ldralighieri.corbind:corbind-bom:2024.01.00\"))\n    implementation(\"ru.ldralighieri.corbind:corbind-material\")\n}\n```\n\nSnapshot build:  \n[![Maven Central](https://img.shields.io/nexus/s/ru.ldralighieri.corbind/corbind?server=https://oss.sonatype.org)](https://oss.sonatype.org/content/repositories/snapshots/ru/ldralighieri/corbind/)\n```kotlin\nrepositories {\n    maven(\"https://oss.sonatype.org/content/repositories/snapshots/\")\n}\n\ndependencies { \n    implementation(platform(\"ru.ldralighieri.corbind:corbind-bom:2024.02.00-SNAPSHOT\"))\n    implementation(\"ru.ldralighieri.corbind:{module}\")\n}\n```\n\n\n## List of extensions\n\nYou can find a list of extensions in the description of each module:  \n* [corbind]  \n* [corbind-activity]  \n* [corbind-appcompat]  \n* [corbind-core]  \n* [corbind-drawerlayout]  \n* [corbind-fragment]  \n* [corbind-leanback]  \n* [corbind-lifecycle]  \n* [corbind-material]  \n* [corbind-navigation]  \n* [corbind-recyclerview]  \n* [corbind-slidingpanelayout]  \n* [corbind-swiperefreshlayout]  \n* [corbind-viewpager]  \n* [corbind-viewpager2]\n\n\n## How to use it?\n\nIf you need to get a text change events of EditText widget, simple use case with cold [Flow][flow] will look something like this:\n```kotlin\nfindViewById\u003cEditText\u003e(R.id.etName)\n    .textChanges() // Flow\u003cCharSequence\u003e\n    .onEach { /* handle text change events */ }\n    .flowWithLifecycle(lifecycle)\n    .launchIn(lifecycleScope) // lifecycle-runtime-ktx\n```\n\nIf you prefer hot [ReceiveChannel][channel] and you need to get a ViewPager page selection events, then the use case will transform in something like this:\n```kotlin\nlaunch {\n    findViewById\u003cViewPager\u003e(R.id.vpSlides)\n        .pageSelections(scope) // ReceiveChannel\u003cInt\u003e\n        .consumeEach {\n            /* handle ViewPager events */\n        }\n}\n```\n\nAnd if you just need to perform an action on button click, the easiest way will be:\n```kotlin\nlaunch {\n    findViewById\u003cAppCompatButton\u003e(R.id.btConfirm)\n        .clicks {\n            /* perform an action on View click events */\n        }\n}\n```\n\nJust one more traditional example of login button enabling/disabling by email and password field validation:\n```kotlin\ncombine(\n    etEmail.textChanges() // Flow\u003cCharSequence\u003e\n        .map { Patterns.EMAIL_ADDRESS.matcher(it).matches() },\n\n    etPassword.textChanges() // Flow\u003cCharSequence\u003e\n        .map { it.length \u003e 7 },\n\n    transform = { email, password -\u003e email \u0026\u0026 password }\n)\n    .onEach { btLogin.isEnabled = it }\n    .flowWithLifecycle(lifecycle)\n    .launchIn(lifecycleScope) // lifecycle-runtime-ktx\n```\n\nMore examples in module descriptions and in source code\n\n\n## Missed or forgot something?\n\nIf I forgot something or you have any ideas what can be added or corrected, please create an issue or contact me directly.\n\n\n## Special thanks to\n\n[Jake Wharton][jw]. This project is inspired by [RxBinding][rx].\n\n\n## License\n\n```\nCopyright 2019-2023 Vladimir Raupov\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\n\n[jw]: https://github.com/JakeWharton\n[rx]: https://github.com/JakeWharton/RxBinding\n[flow]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html\n[channel]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-receive-channel/index.html\n[actor]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/actor.html\n\n[kotlin-coroutine-binding]: https://medium.com/@ldralighieri/kotlin-coroutine-binding-with-flow-support-68499492a89c\n[release-1.7.0]: https://medium.com/@ldralighieri/whats-up-corbind-release-1-7-0-it-s-been-a-long-road-eadf84db19c1\n\n[corbind-bom]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-bom\n[corbind]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind\n[corbind-activity]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-activity\n[corbind-appcompat]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-appcompat\n[corbind-core]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-core\n[corbind-drawerlayout]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-drawerlayout\n[corbind-fragment]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-fragment\n[corbind-leanback]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-leanback\n[corbind-lifecycle]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-lifecycle\n[corbind-material]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-material\n[corbind-navigation]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-navigation\n[corbind-recyclerview]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-recyclerview\n[corbind-slidingpanelayout]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-slidingpanelayout\n[corbind-swiperefreshlayout]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-swiperefreshlayout\n[corbind-viewpager]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-viewpager\n[corbind-viewpager2]: https://github.com/LDRAlighieri/Corbind/tree/master/corbind-viewpager2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLDRAlighieri%2FCorbind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLDRAlighieri%2FCorbind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLDRAlighieri%2FCorbind/lists"}