I am using RxJava and RxBindings to view in android. Below is an example of what I am doing.
RxView.clicks(btMyButton).flatMap(btn -> { // another observable which can throw onError. return Observable.error(null); }).subscribe(object -> { Log.d("CLICK", "button clicked"); }, error -> { Log.d("CLICK", "ERROR"); });
when I click on MyButton, I use flatMap to return another observable, which is a network call, and may return success or error. when it returns an error, I process it in the error block. but I cannot press the button again.
How can I handle the error and still be able to click the button again?
source share