GeezerVison is showing github.com — fix: correct readme doc for buffered demo · linuxgg/RxJava-Android-Samples@e805667
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: README.md +2-3Lines changed: 2 additions & 3 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -21,10 +21,9 @@ A button is provided and we accumulate the number of clicks on that button, over |
21 | 21 |
|
22 | 22 | If you hit the button once. you'll get message saying the button was hit once. If you hit it 5 times continuosly within a span of 2 seconds, then you get a single log, saying you hit that button 5 times (vs 5 individual logs saying "Button hit once"). |
23 | 23 |
|
24 | | -Two possible implementations: |
| 24 | +Note: |
25 | 25 |
|
26 | | -2a. Using a traditional observable - but encompassing the OnClick within the observable (as demoed here) |
27 | | -2b. Using PublishSubject and sending single clicks to the Observable, which in-turn then sends it to the Observer |
| 26 | +If you're looking for a more foolproof solution that accumulates "continuous" taps vs just the number of taps within a time span, look at the [EventBus Demo](https://github.com/kaushikgopal/Android-RxJava/blob/master/app/src/main/java/com/morihacky/android/rxjava/rxbus/RxBusDemo_Bottom3Fragment.java) where a combo of the `publish` and `buffer` operators is used. For a more detailed explanation you can also have a look at this [blog post](http://nerds.weddingpartyapp.com/tech/2015/01/05/debouncedbuffer-used-in-rxbus-example/). |
28 | 27 |
|
29 | 28 | ### Instant/Auto searching (subject + debounce) |
30 | 29 |
|
|