Class PunchcardListFragment<A extends PunchcardAdapter,V extends PunchcardListView,P extends PunchcardListPresenter<V>>
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V,P>
-
- com.cheetahdigital.uikit.architecture.lce.LceFragmentView<V,P>
-
- com.cheetahdigital.uikit.architecture.refreshable.RefreshableFragmentView<V,P>
-
- com.cheetahdigital.uikit.widget.list.ListFragmentView<V,P>
-
- com.cheetahdigital.uikit.widget.list.EndlessListAndGridFragmentView<A,V,P>
-
- com.cheetahdigital.punchcards.ui.list.PunchcardListFragment<A,V,P>
-
- All Implemented Interfaces:
android.content.ComponentCallbacks
,android.view.View.OnCreateContextMenuListener
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
,androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener
,AnalyticsManager.AnalyticsScreen
,PunchcardListView
,LceView
,MvpLceView
,MvpView
,RefreshableView
,EndlessListView
,ListView
public class PunchcardListFragment<A extends PunchcardAdapter,V extends PunchcardListView,P extends PunchcardListPresenter<V>> extends EndlessListAndGridFragmentView<A,V,P> implements PunchcardListView
The fragment class for showing the list ofPunchcard
Can receive the following intent extras:IntentKey.PRIMARY_PARAMS
- thePunchcardParams
to include in API calls
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TAG
-
Fields inherited from class com.cheetahdigital.uikit.widget.list.EndlessListAndGridFragmentView
mEndlessRecyclerOnScrollListener, mGridLayoutManager
-
Fields inherited from class com.cheetahdigital.uikit.widget.list.ListFragmentView
mLinearLayoutManager, mListView, mSelectedPosition
-
Fields inherited from class com.cheetahdigital.uikit.architecture.refreshable.RefreshableFragmentView
mSwipeRefreshLayout
-
Fields inherited from class com.cheetahdigital.uikit.architecture.lce.LceFragmentView
mContentView, mErrorView, mInitialLoad, mLoadingView
-
-
Constructor Summary
Constructors Constructor Description PunchcardListFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendPunchcardInstanceList(java.util.List<PunchcardInstance> punchcards, int totalEntries)
This will be called by the presenter after a successful call to the API.protected androidx.recyclerview.widget.RecyclerView.ItemDecoration
createItemDecoration()
Create the item decoration used in the RecyclerView.protected P
createPresenter()
InstantiateMvpFragmentView.mPresenter
to be used for thisMvpActivityView
protected PunchcardAdapter
createPunchcardAdapter()
Gets the adapter for the Punchcard Listprotected int
getContentLayoutId()
Provide the Content Layout ID which is of a Layout Resource Reference of Androidandroid.view.View
onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
void
showPunchcardInstanceList(java.util.List<PunchcardInstance> punchcards, int totalEntries)
This will be called by the presenter after a successful call to the API-
Methods inherited from class com.cheetahdigital.uikit.widget.list.EndlessListAndGridFragmentView
getCurrentPage, getGridViewNumColumns, getListTotalEntries, isGridView, onFinishLoadMore, onFinishRefresh, onLoadMoreFailed, setCurrentPage, setIsGridView, setListTotalEntries, setSpanSizeLookupForGridView
-
Methods inherited from class com.cheetahdigital.uikit.widget.list.ListFragmentView
getLayoutManager, isListAnimationEnabled, onAttach, setExitTransition, showContent, startActivity, startActivityForResult
-
Methods inherited from class com.cheetahdigital.uikit.architecture.refreshable.RefreshableFragmentView
onRefresh, onRefreshFailed, reloadData, showError, showLoading, startRefresh
-
Methods inherited from class com.cheetahdigital.uikit.architecture.lce.LceFragmentView
onLoadFailed, onLoadSuccess, onViewCreated, setErrorViewClickListener
-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
captureSharedElementValues, getPresenter, getScreenName, getSharedElementViews, initSharedElementValues, isSharedAnimationEnabled, onDestroyView
-
Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, onViewStateRestored, postponeEnterTransition, postponeEnterTransition, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.cheetahdigital.corekit.sdk.analytics.AnalyticsManager.AnalyticsScreen
getScreenName
-
Methods inherited from interface com.cheetahdigital.uikit.widget.list.EndlessListView
onFinishLoadMore, onLoadMoreFailed
-
Methods inherited from interface com.cheetahdigital.uikit.architecture.lce.LceView
onLoadFailed, onLoadSuccess, setErrorViewClickListener
-
Methods inherited from interface com.cheetahdigital.uikit.architecture.lce.MvpLceView
showContent, showError, showLoading
-
Methods inherited from interface com.cheetahdigital.uikit.architecture.refreshable.RefreshableView
onFinishRefresh, onRefreshFailed
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
onCreateView
@Nullable public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
- Overrides:
onCreateView
in classEndlessListAndGridFragmentView<A extends PunchcardAdapter,V extends PunchcardListView,P extends PunchcardListPresenter<V>>
-
getContentLayoutId
protected int getContentLayoutId()
Description copied from class:MvpFragmentView
Provide the Content Layout ID which is of a Layout Resource Reference of Android- Specified by:
getContentLayoutId
in classMvpFragmentView<V extends PunchcardListView,P extends PunchcardListPresenter<V>>
- Returns:
- id of the content layout
-
createPresenter
protected P createPresenter()
Description copied from class:MvpFragmentView
InstantiateMvpFragmentView.mPresenter
to be used for thisMvpActivityView
- Specified by:
createPresenter
in classMvpFragmentView<V extends PunchcardListView,P extends PunchcardListPresenter<V>>
- Returns:
- return the
MvpBasePresenter
-
createPunchcardAdapter
protected PunchcardAdapter createPunchcardAdapter()
Gets the adapter for the Punchcard List- Returns:
- Adapter of Punchcard List
-
createItemDecoration
protected androidx.recyclerview.widget.RecyclerView.ItemDecoration createItemDecoration()
Create the item decoration used in the RecyclerView. This invoked when initializing the list for the first time- Returns:
- instance of
RecyclerView.ItemDecoration
for the RecyclerView
-
showPunchcardInstanceList
public void showPunchcardInstanceList(java.util.List<PunchcardInstance> punchcards, int totalEntries)
Description copied from interface:PunchcardListView
This will be called by the presenter after a successful call to the API- Specified by:
showPunchcardInstanceList
in interfacePunchcardListView
- Parameters:
punchcards
- list ofPunchcardInstance
from the APItotalEntries
- int total number of entries in the server
-
appendPunchcardInstanceList
public void appendPunchcardInstanceList(java.util.List<PunchcardInstance> punchcards, int totalEntries)
Description copied from interface:PunchcardListView
This will be called by the presenter after a successful call to the API. This is a special implementation for components with EndlessList implementation- Specified by:
appendPunchcardInstanceList
in interfacePunchcardListView
- Parameters:
punchcards
- list ofPunchcardInstance
from the APItotalEntries
- int total number of entries in the server
-
-