Class RefreshablePresenter<V extends RefreshableView>
- java.lang.Object
-
- com.cheetahdigital.uikit.architecture.mvp.MvpNullObjectBasePresenter<V>
-
- com.cheetahdigital.uikit.architecture.mvp.Presenter<V>
-
- com.cheetahdigital.uikit.architecture.lce.LcePresenter<V>
-
- com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter<V>
-
- Type Parameters:
V
- the Refreshable View
- All Implemented Interfaces:
MvpPresenter<V>
- Direct Known Subclasses:
EventDateListPresenter
,GiftcardDetailsPresenter
,GiftcardsPagerPresenter
,ListPresenter
,MemberDetailPresenter
,ProfileLandingPresenter
,ProfilePresenter
public abstract class RefreshablePresenter<V extends RefreshableView> extends LcePresenter<V>
A Presenter which supports loading and refreshing of data to shown viaRefreshableView
. NOTE: Don't forget to callonFinishRefresh()
after refresh attempt to properly save states!
-
-
Constructor Summary
Constructors Constructor Description RefreshablePresenter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isRefreshing()
Set if current instance is refreshingvoid
onRefreshFailed(java.lang.String error)
End of refresh with failed attemptvoid
onRefreshSuccess(BaseData data)
End of refresh with success request.void
refreshData()
Start the refresh view data.-
Methods inherited from class com.cheetahdigital.uikit.architecture.lce.LcePresenter
loadData, onLoadFailed, onLoadSuccess
-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpNullObjectBasePresenter
attachView, detachView, getView
-
-
-
-
Method Detail
-
refreshData
public void refreshData()
Start the refresh view data.
-
isRefreshing
public boolean isRefreshing()
Set if current instance is refreshing- Returns:
- true if current state is refreshing, else false
-
onRefreshFailed
public void onRefreshFailed(java.lang.String error)
End of refresh with failed attempt- Parameters:
error
- short description on reason of failure
-
-