Skip to content

Instantly share code, notes, and snippets.

@DavidRyan
Created March 18, 2015 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidRyan/a2eff6b6f5e0ced3a7fe to your computer and use it in GitHub Desktop.
Save DavidRyan/a2eff6b6f5e0ced3a7fe to your computer and use it in GitHub Desktop.
Observable<Boolean> passwordObservable = Observable.combineLatest(
validatePassword(RxViewUtils.text(mPassword)),
(RxViewUtils.text(mPasswordConfirm)),
(password, confirm) -> password.equals(confirm));
Observable.combineLatest(
validateFirstName(RxViewUtils.text(mUsername)),
passwordObservable,
(username, password) -> username && password
).subscribe(
enabled -> {
mContinue.setEnabled(enabled);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment