CV - The type of the content view with the id = R.id.contentView. Can be any kind of
android view widget like ListView, RecyclerView, ScrollView or a simple layout like Framelayout
etc. (everything that extends from android.view.View)M - The underlying data model that will be displayed with this viewV - The View interface that must be implemented by this view. You can use {mylink MvpLceView},
but if you want to add more methods you have to provide your own view interface that extends from {mylink MvpLceView}P - The type of the Presenter. Must extend from {mylink MvpPresenter}public abstract class RxMvpLceFragment<CV extends android.view.View,M,V extends <any>,P extends <any>> extends RxMvpFragment<V,P>
| 限定符和类型 | 字段和说明 |
|---|---|
protected CV |
contentView |
protected android.widget.TextView |
errorView |
protected android.view.View |
loadingView |
mvpDelegate, presenter| 构造器和说明 |
|---|
RxMvpLceFragment() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
animateContentViewIn()
Called to animate from loading view to content view
|
protected void |
animateErrorViewIn()
Animates the error view in (instead of displaying content view / loading view)
|
protected void |
animateLoadingViewIn()
Override this method if you want to provide your own animation for showing the loading view
|
protected abstract String |
getErrorMessage(Throwable e,
boolean pullToRefresh)
Get the error message for a certain Exception that will be shown on {mylink
#showError(Throwable, boolean)}
|
void |
onDestroyView() |
protected void |
onErrorViewClicked()
Called if the error view has been clicked.
|
void |
onViewCreated(android.view.View view,
android.os.Bundle savedInstanceState) |
void |
showContent() |
void |
showError(Throwable e,
boolean pullToRefresh) |
protected void |
showLightError(String msg)
The default behaviour is to display a toast message as light error (i.e. pull-to-refresh
error).
|
void |
showLoading(boolean pullToRefresh) |
createPresenter, getMvpDelegate, getMvpView, getPresenter, isRetainInstance, onActivityCreated, onAttach, onCreate, onDestroy, onDetach, onPause, onResume, onSaveInstanceState, onStart, onStop, setPresenter, shouldInstanceBeRetainedprotected android.view.View loadingView
protected CV extends android.view.View contentView
protected android.widget.TextView errorView
public void onViewCreated(android.view.View view,
android.os.Bundle savedInstanceState)
onViewCreated 在类中 RxMvpFragment<V extends <any>,P extends <any>>public void showLoading(boolean pullToRefresh)
protected void animateLoadingViewIn()
public void showContent()
protected void animateContentViewIn()
protected abstract String getErrorMessage(Throwable e, boolean pullToRefresh)
protected void showLightError(String msg)
protected void onErrorViewClicked()
errorView.setClickable(false)public void showError(Throwable e, boolean pullToRefresh)
protected void animateErrorViewIn()
public void onDestroyView()
onDestroyView 在类中 RxMvpFragment<V extends <any>,P extends <any>>