Class EventResponseListFragment<A extends EventResponseListAdapter,V extends EventResponseListView,P extends EventResponseListPresenter<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.EndlessListFragmentView<A,V,P>
-
- com.cheetahdigital.event.ui.responses.list.EventResponseListFragment<A,V,P>
-
- All Implemented Interfaces:
android.content.ComponentCallbacks
,android.view.View.OnCreateContextMenuListener
,androidx.activity.result.ActivityResultCaller
,androidx.lifecycle.HasDefaultViewModelProviderFactory
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
,androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener
,com.cheetahdigital.corekit.sdk.analytics.AnalyticsManager.AnalyticsScreen
,EventResponseListView
,OnItemClickListener
,com.cheetahdigital.uikit.architecture.lce.LceView
,com.cheetahdigital.uikit.architecture.lce.MvpLceView
,com.cheetahdigital.uikit.architecture.mvp.MvpView
,com.cheetahdigital.uikit.architecture.refreshable.RefreshableView
,com.cheetahdigital.uikit.widget.list.EndlessListView
,com.cheetahdigital.uikit.widget.list.ListView
public class EventResponseListFragment<A extends EventResponseListAdapter,V extends EventResponseListView,P extends EventResponseListPresenter<V>> extends com.cheetahdigital.uikit.widget.list.EndlessListFragmentView<A,V,P> implements EventResponseListView, com.cheetahdigital.corekit.sdk.analytics.AnalyticsManager.AnalyticsScreen, OnItemClickListener
The Fragment class for showing the list ofEventResponse
Can receive the following intent extras:IntentKey.PRIMARY_PARAMS
- instance ofEventsParams
used forEventsAPI
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.uikit.widget.list.EndlessListFragmentView
mEndlessRecyclerOnScrollListener
-
Fields inherited from class com.cheetahdigital.uikit.widget.list.ListFragmentView
mLinearLayoutManager, mListView, mSelectedPosition
-
-
Constructor Summary
Constructors Constructor Description EventResponseListFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendEventResponses(java.util.List<EventResponse> eventResponses, int totalEntries)
Append a list ofEventResponse
to the current listprotected void
captureSharedElementValues(android.content.Intent intent)
Captures the shared element and passes its values to intent.protected EventResponseListAdapter
createEventResponseAdapter()
protected com.cheetahdigital.uikit.widget.DividerItemDecoration
createItemDecoration()
protected P
createPresenter()
InstantiateMvpFragmentView.mPresenter
to be used for thisMvpActivityView
protected int
getContentLayoutId()
Provide the Content Layout ID which is of a Layout Resource Reference of Androidint
getScreenName()
protected android.view.View[]
getSharedElementViews()
Fetches the shared element views.void
onCreate(android.os.Bundle savedInstanceState)
android.view.View
onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
void
onDestroy()
void
onItemClick(EventResponse eventResponse, android.view.View view, int position)
Triggered when clicking an itemvoid
showEventResponsesList(java.util.List<EventResponse> eventResponses, int totalEntries)
Shows the list ofEventResponse
void
showSnackbarError(java.lang.String error)
Show an error via snack bar-
Methods inherited from class com.cheetahdigital.uikit.widget.list.EndlessListFragmentView
onFinishLoadMore, onFinishRefresh, onLoadMoreFailed, setListTotalEntries
-
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
getPresenter, initSharedElementValues, isSharedAnimationEnabled, onDestroyView
-
Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, 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, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, onViewStateRestored, postponeEnterTransition, postponeEnterTransition, registerForActivityResult, registerForActivityResult, 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.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
-
-
-
-
Method Detail
-
onCreateView
@Nullable public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
- Overrides:
onCreateView
in classcom.cheetahdigital.uikit.widget.list.EndlessListFragmentView<A extends EventResponseListAdapter,V extends EventResponseListView,P extends EventResponseListPresenter<V>>
-
createPresenter
protected P createPresenter()
Description copied from class:com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
InstantiateMvpFragmentView.mPresenter
to be used for thisMvpActivityView
- Specified by:
createPresenter
in classcom.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V extends EventResponseListView,P extends EventResponseListPresenter<V>>
- Returns:
- return the
MvpBasePresenter
-
showEventResponsesList
public void showEventResponsesList(java.util.List<EventResponse> eventResponses, int totalEntries)
Description copied from interface:EventResponseListView
Shows the list ofEventResponse
- Specified by:
showEventResponsesList
in interfaceEventResponseListView
- Parameters:
eventResponses
- list ofEventResponse
to displaytotalEntries
- max number ofEventResponse
-
appendEventResponses
public void appendEventResponses(java.util.List<EventResponse> eventResponses, int totalEntries)
Description copied from interface:EventResponseListView
Append a list ofEventResponse
to the current list- Specified by:
appendEventResponses
in interfaceEventResponseListView
- Parameters:
eventResponses
- list ofEventResponse
to appendtotalEntries
- max number ofEventResponse
-
showSnackbarError
public void showSnackbarError(java.lang.String error)
Description copied from interface:EventResponseListView
Show an error via snack bar- Specified by:
showSnackbarError
in interfaceEventResponseListView
- Parameters:
error
- info of the error
-
getSharedElementViews
protected android.view.View[] getSharedElementViews()
Description copied from class:com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
Fetches the shared element views.- Overrides:
getSharedElementViews
in classcom.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V extends EventResponseListView,P extends EventResponseListPresenter<V>>
- Returns:
- list of shared element
View
-
captureSharedElementValues
protected void captureSharedElementValues(android.content.Intent intent)
Description copied from class:com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
Captures the shared element and passes its values to intent.- Overrides:
captureSharedElementValues
in classcom.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V extends EventResponseListView,P extends EventResponseListPresenter<V>>
- Parameters:
intent
-Intent
to store the shared element values
-
getContentLayoutId
protected int getContentLayoutId()
Description copied from class:com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
Provide the Content Layout ID which is of a Layout Resource Reference of Android- Specified by:
getContentLayoutId
in classcom.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V extends EventResponseListView,P extends EventResponseListPresenter<V>>
- Returns:
- id of the content layout
-
getScreenName
public int getScreenName()
- Specified by:
getScreenName
in interfacecom.cheetahdigital.corekit.sdk.analytics.AnalyticsManager.AnalyticsScreen
- Overrides:
getScreenName
in classcom.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V extends EventResponseListView,P extends EventResponseListPresenter<V>>
-
onCreate
public void onCreate(@Nullable android.os.Bundle savedInstanceState)
- Overrides:
onCreate
in classandroidx.fragment.app.Fragment
-
onDestroy
public void onDestroy()
- Overrides:
onDestroy
in classandroidx.fragment.app.Fragment
-
onItemClick
public void onItemClick(EventResponse eventResponse, android.view.View view, int position)
Description copied from interface:OnItemClickListener
Triggered when clicking an item- Specified by:
onItemClick
in interfaceOnItemClickListener
- Parameters:
eventResponse
- theEventResponse
clickedview
- the current view selectedposition
- position of the current view
-
createEventResponseAdapter
protected EventResponseListAdapter createEventResponseAdapter()
- Returns:
- instance of
EventResponseListAdapter
-
createItemDecoration
protected com.cheetahdigital.uikit.widget.DividerItemDecoration createItemDecoration()
- Returns:
- instance of
DividerItemDecoration
-
-