Class LceFragmentView<V extends LceView,P extends LcePresenter<V>>
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V,P>
-
- com.cheetahdigital.uikit.architecture.lce.LceFragmentView<V,P>
-
- Type Parameters:
V- the Refreshable ViewP- the Refreshable Presenter
- All Implemented Interfaces:
android.content.ComponentCallbacks,android.view.View.OnCreateContextMenuListener,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner,AnalyticsManager.AnalyticsScreen,LceView,MvpLceView,MvpView
- Direct Known Subclasses:
BadgeDetailsFragment,ContentPageFragment,FeedbackFragment,MembershipCardFragment,ReferralCodeFragment,RefreshableFragmentView,RetroclaimFragment,StaticFileFragment,SubmitReferralCodeFragment
public abstract class LceFragmentView<V extends LceView,P extends LcePresenter<V>> extends MvpFragmentView<V,P> implements LceView, AnalyticsManager.AnalyticsScreen
The
Requires the following IDs in your Layout XML:Fragmentcounterpart forLceActivityView. BaseMvpFragmentViewwhich supports the Loading-Content-Error pattern.- loading_view - the
Viewto show when loading data - content_view - the
Viewafter the data loaded successfully - error_view - the
Viewto show when there was an error loading the data
-
-
Field Summary
Fields Modifier and Type Field Description protected android.view.ViewmContentViewprotected android.view.ViewmErrorViewprotected booleanmInitialLoadprotected android.view.ViewmLoadingView
-
Constructor Summary
Constructors Constructor Description LceFragmentView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description android.view.ViewonCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)voidonLoadFailed(java.lang.String error)voidonLoadSuccess()voidonViewCreated(android.view.View view, android.os.Bundle savedInstanceState)voidsetErrorViewClickListener(android.view.View.OnClickListener errorViewClickListener)voidshowContent()Shows the content view.voidshowError()Shows the error view.voidshowLoading()Shows the loading view.-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
captureSharedElementValues, createPresenter, getContentLayoutId, getPresenter, getScreenName, getSharedElementViews, initSharedElementValues, isSharedAnimationEnabled, onAttach, onDestroyView, startActivity, startActivityForResult
-
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
-
-
-
-
Method Detail
-
onCreateView
@Nullable public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)- Overrides:
onCreateViewin classMvpFragmentView<V extends LceView,P extends LcePresenter<V>>
-
onViewCreated
public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)- Overrides:
onViewCreatedin classMvpFragmentView<V extends LceView,P extends LcePresenter<V>>
-
showLoading
public void showLoading()
Shows the loading view.- Specified by:
showLoadingin interfaceMvpLceView
-
showContent
public void showContent()
Shows the content view.- Specified by:
showContentin interfaceMvpLceView
-
showError
public void showError()
Shows the error view.- Specified by:
showErrorin interfaceMvpLceView
-
setErrorViewClickListener
public void setErrorViewClickListener(android.view.View.OnClickListener errorViewClickListener)
- Specified by:
setErrorViewClickListenerin interfaceLceView
-
onLoadFailed
public void onLoadFailed(java.lang.String error)
- Specified by:
onLoadFailedin interfaceLceView
-
onLoadSuccess
public void onLoadSuccess()
- Specified by:
onLoadSuccessin interfaceLceView
-
-