Created
October 20, 2016 18:22
-
-
Save michaelzengke/eed97008c70fd7523b6708717f5f062e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TextView textView = aTextView; | |
Observable<String> textViewChangedTextRepository = Observable.fromEmitter(emitter -> { | |
textView.addTextChangedListener(new TextWatcher() { | |
public void onTextChanged(final CharSequence s, final int start, final int before, final int count) { | |
emitter.onNext(s.toString()); | |
} | |
public void beforeTextChanged(final CharSequence s, final int start, final int count, final int after) { | |
} | |
public void afterTextChanged(final Editable s) { | |
} | |
}); | |
}, Emitter.BackpressureMode.LATEST); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment