From d83a793b488e8efff0401e2b13968c069acefd52 Mon Sep 17 00:00:00 2001 From: doperez Date: Sat, 30 Mar 2019 02:28:47 -0500 Subject: [PATCH] Added simple documentation for observing clicks on a View and text changes on an EditText. --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index f07793b1..d7607039 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,23 @@ RxBinding RxJava binding APIs for Android UI widgets from the platform and support libraries. +Getting Started +--------------- +**Observing Clicks** +``` + RxView.clicks(button) + .debounce(300, TimeUnit.MILLISECONDS) + .subscribe(); +``` + +**Observing an EditText** +``` + RxTextView.textChanges(editText) + .debounce(300, TimeUnit.MILLISECONDS) + .subscribe(); +``` +For Kotlin, these bindings are implemented using extension functions, +so just call .clicks()/.textChanges() on your View type. Download --------