I am using RxJava and RxBindings for view in android. following 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 can return success or error. when it returns an error i handle it in error block. but I am not able to click the button again.
How can I handle the error and still be able to click on the button again?