Closed dhluong90 closed 7 years ago
It's not a good idea to use getView()
because you aren't guaranteed that the view is not null (it can be null depending on where in the lifecycle the presenter is).
You can however use view()
which is an observable that will emit the view when it is/becomes present
You can use the following syntax:
add(request() .observeOn(AndroidSchedulers.mainThread()) .subscribe(split( View::showSuccess, View::showError )));
Hi, you can use non-rx presenter, getView
is not deprecated there.
In my case, I just have an activity with phone number edit text. User input, I send this to server. it's very simple. I don't need restartable feature or something like this. But in current version, someone mark @Deprecated for getView() method. what is the best practice to write my case?