but it transforms only a single source event at a time. Therefore, it guarantees that the items emitted in the resulting stream maintain the same order and will not be interleaved.
is emitted by either of two Observables, combine the latest item emitted by each Observable via a specified function and emit items based on the results of this function
<p> * After an Observer calls an Observable's subscribe() method, the Observable calls the Observer's * onNext() method to provide notifications. A well-behaved Observable will call an Observer's * onCompleted() method exactly once or the Observer’s onError() method exactly once. * * @see <a href="http://reactivex.io/documentation/observable.html">ReactiveX documentation: Observable</a> * @param <T> the type of item the Observer expects to observe */ public interface Observer<T> { /** * Notifies the Observer that the Observable has finished sending push-based notifications. * The Observable will not call this method if it calls onError(). */ void onCompleted(); /** * Notifies the Observer that the Observable has experienced an error condition. * If the Observable calls this method, it will not thereafter call onNext() or * onCompleted(). * * @param e the exception encountered by the Observable */ void onError(Throwable e); /** * Provides the Observer with a new item to observe. * The Observable may call this method 0 or more times. * The Observable will not call this method again after it calls either onCompleted() or * onError(). * * @param t the item emitted by the Observable */ void onNext(T t); }
on which the Observable should operate. • observeOn() operator specifies the Scheduler that the Observable will use to send notifications to its observers. Schedulers • RxJava comes with several out of the box Schedulers to use with Observables, such as Schedulers.io() (for blocking I/O operations), Schedulers.computation() (computational work) and Schedulers.newThread() (creates new thread for the work).
an empty email input field. Check #1 • If there currently is an error immediately clear it as the email input field changes. • If the user starts typing, don’t immediately check for validity but instead wait for 400 ms to pass after the last change was made to the email input field. • If the validity check returns true clear the error view from the email input field, otherwise display the error view on the email input field.
an empty password input field. Check #2 • If there currently is an error immediately clear it as the password input field changes. • If the user starts typing, don’t immediately check for validity but instead wait for 400 ms to pass after the last change was made to the password input field. • If the validity check returns true clear the error view from the password input field, otherwise display the error view on the password input field.