Skip to content

Instantly share code, notes, and snippets.

@AjiSetya
Forked from rohmanhakim/TriggerStream.java
Created February 15, 2017 07:56
Show Gist options
  • Select an option

  • Save AjiSetya/b9f218454a4a01eccbebf78253af3c58 to your computer and use it in GitHub Desktop.

Select an option

Save AjiSetya/b9f218454a4a01eccbebf78253af3c58 to your computer and use it in GitHub Desktop.
// Return true jika email user sudah terpakai
Observable<Boolean> emailStream = RxTextView.textChanges(etEmail)
.map(new Func1<CharSequence, String>() {
@Override
public String call(CharSequence charSequence) {
return charSequence.toString();
}
})
.filter(new Func1<String, Boolean>() {
@Override
public Boolean call(String input) {
return input.length() > 3;
}
})
.debounce(100,TimeUnit.MILLISECONDS);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment