Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit e3eb70a

Browse files
committed
Adds some documentation around connectable observable.
1 parent 282b869 commit e3eb70a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

rxbinding/src/main/java/com/jakewharton/rxbinding/view/RxGestures.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010

1111
/**
1212
* Attaches a GestureDetector to the supplied touch event observable to be notified of
13-
* gesture events.
13+
* gesture events. The RxGestures instance will subscribe to the supplied Observable, so
14+
* if you'd like to have more than one subscriber you need to wrap it in a
15+
* {@code ConnectableObservable} before passing it into this class.
1416
* <p>
1517
* {@code
16-
* Observable<MotionEvent> touches = RxView.touches(view);
18+
* ConnectableObservable<ViewTouchEvent> touches = RxView.touches(view).publish();
19+
* touches.connect();
1720
* RxGestures gestures = RxGestures.withTouches(view, touches);
1821
* Observable<ViewGestureScrollEvent> scrolls = gestures.scroll();
1922
* }

0 commit comments

Comments
 (0)