Last active
September 24, 2017 18:03
-
-
Save JoaquimLey/54623c1283b4ee12416859d92b4edb78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class BasePresenter<V> { | |
protected V mView; | |
public final void attachView(@NonNull V view) { | |
mView = view; | |
} | |
public final void detachView() { | |
mView = null; | |
} | |
/** | |
* Check if the view is attached. | |
* This checking is only necessary when returning from an asynchronous call | |
*/ | |
protected final boolean isViewAttached() { | |
return mView != null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment