Skip to content

Commit

Permalink
Adds some documentation around connectable observable.
Browse files Browse the repository at this point in the history
  • Loading branch information
rharter committed Sep 9, 2015
1 parent 282b869 commit e3eb70a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@

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

0 comments on commit e3eb70a

Please sign in to comment.