# test-FlowBinding **Repository Path**: atom_wyz153523/test-flow-binding ## Basic Information - **Project Name**: test-FlowBinding - **Description**: 受RxBinding启发,用于 Android 平台的 Kotlin Flow 绑定 API 和未捆绑的 UI 小部件。 Flow是(概念上)由kotlinx-coroutines-core工件提供的反应式流实现。 FlowBinding提供了一组广泛的扩展函数,将 Android UI 小部件上的传统回调/侦听器转换为Flow类型。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-12 - **Last Updated**: 2022-02-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FlowBinding ![CI](https://github.com/ReactiveCircus/FlowBinding/workflows/Build/badge.svg) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.reactivecircus.flowbinding/flowbinding-android/badge.svg)](https://search.maven.org/search?q=g:io.github.reactivecircus.flowbinding) [![Android API](https://img.shields.io/badge/API-14%2B-blue.svg?label=API&maxAge=300)](https://www.android.com/history/) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) Kotlin Flow binding APIs for Android's platform and unbundled UI widgets, inspired by [RxBinding][rxbinding]. [Flow][flow] is (conceptually) a reactive streams implementation provided by the [kotlinx-coroutines-core][kotlinx-coroutines] artifact. **FlowBinding** offers an extensive set of extension functions that turn traditional callbacks / listeners on Android UI widgets into the `Flow` type. ## Article - [Binding Android UI with Kotlin Flow][article] - featured in [Kotlin Weekly #170][kotlin-weekly] - [FlowBinding 1.0](https://dev.to/ychescale9/flowbinding-1-0-44h) ## Download Dependencies are hosted on [Maven Central][maven-central]. Latest version: ```groovy def flowbinding_version = "1.2.0" ``` ### Platform Bindings ```groovy implementation "io.github.reactivecircus.flowbinding:flowbinding-android:${flowbinding_version}" ``` ### AndroidX Bindings ```groovy implementation "io.github.reactivecircus.flowbinding:flowbinding-activity:${flowbinding_version}" implementation "io.github.reactivecircus.flowbinding:flowbinding-appcompat:${flowbinding_version}" implementation "io.github.reactivecircus.flowbinding:flowbinding-core:${flowbinding_version}" implementation "io.github.reactivecircus.flowbinding:flowbinding-drawerlayout:${flowbinding_version}" implementation "io.github.reactivecircus.flowbinding:flowbinding-lifecycle:${flowbinding_version}" implementation "io.github.reactivecircus.flowbinding:flowbinding-navigation:${flowbinding_version}" implementation "io.github.reactivecircus.flowbinding:flowbinding-preference:${flowbinding_version}" implementation "io.github.reactivecircus.flowbinding:flowbinding-recyclerview:${flowbinding_version}" implementation "io.github.reactivecircus.flowbinding:flowbinding-swiperefreshlayout:${flowbinding_version}" implementation "io.github.reactivecircus.flowbinding:flowbinding-viewpager:${flowbinding_version}" implementation "io.github.reactivecircus.flowbinding:flowbinding-viewpager2:${flowbinding_version}" ``` ### Material Components Bindings ```groovy implementation "io.github.reactivecircus.flowbinding:flowbinding-material:${flowbinding_version}" ``` Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap]. ## Usage ### Binding UI Events To observe click events on an Android `View`: ```kotlin findViewById