All Projects → LDRAlighieri → Corbind

LDRAlighieri / Corbind

Licence: apache-2.0
Kotlin Coroutines binding APIs for Android UI widgets from the platform and support libraries

Programming Languages

kotlin
9241 projects
flow
126 projects

Projects that are alternatives of or similar to Corbind

korte
Kotlin cORoutines Template Engine for Multiplatform Kotlin
Stars: ✭ 69 (-80.67%)
Mutual labels:  coroutines, kotlin-coroutines
jda-ktx
Collection of useful Kotlin extensions for JDA
Stars: ✭ 49 (-86.27%)
Mutual labels:  coroutines, kotlin-coroutines
SlideView
🔖 Card RecycleViewManager, to make your interface cool.Use recyclerView to add cool effects to the view.
Stars: ✭ 16 (-95.52%)
Mutual labels:  recyclerview, viewpager
android-clean-arc-coroutines
Clean Architecture(Coroutines,Dagger, MVVM, ROOM, retrofit, databinding)
Stars: ✭ 116 (-67.51%)
Mutual labels:  coroutines, kotlin-coroutines
Coroutineworker
Kotlin Coroutine-based workers for native
Stars: ✭ 282 (-21.01%)
Mutual labels:  coroutines, kotlin-coroutines
WanAndroidJetpack
🔥 WanAndroid 客户端,Kotlin + MVVM + Jetpack + Retrofit + Glide。基于 MVVM 架构,用 Jetpack 实现,网络采用 Kotlin 的协程和 Retrofit 配合使用!精美的 UI,便捷突出的功能实现,欢迎下载体验!
Stars: ✭ 124 (-65.27%)
Mutual labels:  coroutines, kotlin-coroutines
Retrofit2-Flow-Call-Adapter
A Retrofit 2 adapter for Kotlin Flows.
Stars: ✭ 41 (-88.52%)
Mutual labels:  coroutines, kotlin-coroutines
mqtt
Kotlin cross-platform, coroutine based, reflectionless MQTT 3.1.1 & 5.0 client & server
Stars: ✭ 31 (-91.32%)
Mutual labels:  coroutines, kotlin-coroutines
Transformerslayout
🔥 App金刚区导航菜单,类似淘宝、QQ音乐等APP导航,方格布局横向多行滑动翻页带滚动条
Stars: ✭ 258 (-27.73%)
Mutual labels:  recyclerview, viewpager
Coffeegram
Android app using Jetpack Compose together with StateFlow and MVI
Stars: ✭ 155 (-56.58%)
Mutual labels:  coroutines, kotlin-coroutines
SketchwareManager
Coroutine-based library for managing Sketchware (Sketchware Pro/Studio) projects, collections and etc.
Stars: ✭ 54 (-84.87%)
Mutual labels:  coroutines, kotlin-coroutines
Cardslideview
一行代码实现ViewPager卡片效果,比ViewPager2更强大,底层同样是RecyclerView
Stars: ✭ 301 (-15.69%)
Mutual labels:  recyclerview, viewpager
NewsReader
Android News Reader app. Kotlin Coroutines, Retrofit and Realm
Stars: ✭ 21 (-94.12%)
Mutual labels:  coroutines, kotlin-coroutines
BlueFlow
Android Bluetooth classic API wrapped in Coroutines Flow.
Stars: ✭ 64 (-82.07%)
Mutual labels:  coroutines, kotlin-coroutines
AndroidCoroutineScopes
This lib implements the most common CoroutineScopes used in Android apps.
Stars: ✭ 14 (-96.08%)
Mutual labels:  coroutines, kotlin-coroutines
Antonio
Android library for the adapter view (RecyclerView, ViewPager, ViewPager2)
Stars: ✭ 89 (-75.07%)
Mutual labels:  recyclerview, viewpager
Simple-Notes-Kotlin-App
✍️ Simple Note Making App use mvvm architecture , dagger , coroutines and navigation component. Features includes 🗒️ create , edit and ❌ delete notes
Stars: ✭ 40 (-88.8%)
Mutual labels:  recyclerview, coroutines
Adsorbent
Adsorbent of RecyclerView , RecyclerView吸顶
Stars: ✭ 25 (-93%)
Mutual labels:  recyclerview, viewpager
fluid-mongo
Kotlin coroutine support for MongoDB built on top of the official Reactive Streams Java Driver
Stars: ✭ 27 (-92.44%)
Mutual labels:  coroutines, kotlin-coroutines
Korio
Korio: Kotlin cORoutines I/O : Virtual File System + Async/Sync Streams + Async TCP Client/Server + WebSockets for Multiplatform Kotlin 1.3
Stars: ✭ 282 (-21.01%)
Mutual labels:  coroutines, kotlin-coroutines

Corbind

Maven Central Kotlin Version Kotlin Coroutines Version GitHub license

Codacy Badge API Android Weekly


Kotlin Coroutines binding APIs for Android UI widgets from the platform and support libraries. Supports Flow, ReceiveChannel and Actor.

Description

This library is for Android applications only. Help you to transform Android UI events into cold Flow, hot ReceiveChannel or just perform an action through an Actor.

Download

Platform bindings:

implementation 'ru.ldralighieri.corbind:corbind:1.5.0'

AndroidX library bindings:

implementation 'ru.ldralighieri.corbind:corbind-activity:1.5.0'
implementation 'ru.ldralighieri.corbind:corbind-appcompat:1.5.0'
implementation 'ru.ldralighieri.corbind:corbind-core:1.5.0'
implementation 'ru.ldralighieri.corbind:corbind-drawerlayout:1.5.0'
implementation 'ru.ldralighieri.corbind:corbind-leanback:1.5.0'
implementation 'ru.ldralighieri.corbind:corbind-lifecycle:1.5.0'
implementation 'ru.ldralighieri.corbind:corbind-navigation:1.5.0'
implementation 'ru.ldralighieri.corbind:corbind-recyclerview:1.5.0'
implementation 'ru.ldralighieri.corbind:corbind-slidingpanelayout:1.5.0'
implementation 'ru.ldralighieri.corbind:corbind-swiperefreshlayout:1.5.0'
implementation 'ru.ldralighieri.corbind:corbind-viewpager:1.5.0'
implementation 'ru.ldralighieri.corbind:corbind-viewpager2:1.5.0'

Google 'material' library bindings:

implementation 'ru.ldralighieri.corbind:corbind-material:1.5.0'

Snapshot build:

repositories {
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}

dependencies {
   implementation 'ru.ldralighieri.corbind:{module}:1.5.1-SNAPSHOT'
}

List of extensions

You can find a list of extensions in the description of each module:
corbind
corbind-activity
corbind-appcompat
corbind-core
corbind-drawerlayout
corbind-leanback
corbind-lifecycle
corbind-material
corbind-navigation
corbind-recyclerview
corbind-slidingpanelayout
corbind-swiperefreshlayout
corbind-viewpager
corbind-viewpager2

How to use it?

If you need to get a text change events of EditText widget, simple use case with cold Flow will look something like this:

findViewById<EditText>(R.id.et_name)
    .textChanges() // Flow<CharSequence>
    .onEach { /* handle text change events */ }
    .launchIn(lifecycleScope) // lifecycle-runtime-ktx

If you prefer hot ReceiveChannel and you need to get a ViewPager page selection events, then the use case will transform in something like this:

launch {
    findViewById<ViewPager>(R.id.vp_slides)
        .pageSelections(scope) // ReceiveChannel<Int>
        .consumeEach {
            /* handle ViewPager events */
        }
}

And if you just need to perform an action on button click, the easiest way will be:

launch {
    findViewById<AppCompatButton>(R.id.bt_confirm)
        .clicks {
            /* perform an action on View click events */
        }
}

Just one more traditional example of login button enabling/disabling by email and password field validation:

combine(
    et_email.textChanges()
        .map { Patterns.EMAIL_ADDRESS.matcher(it).matches() },

    et_password.textChanges()
        .map { it.length > 7 },

    transform = { email, password -> email && password }
)
    .onEach { bt_login.isEnabled = it }
    .launchIn(lifecycleScope) // lifecycle-runtime-ktx

More examples in module descriptions and in source code

Missed or forgot something?

If I forgot something or you have any ideas what can be added or corrected, please create an issue or contact me directly.

Special thanks to

Jake Wharton. This project is inspired by RxBinding.

License

Copyright 2019 Vladimir Raupov

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].