Class SubmitReferralCodeFragment<V extends SubmitReferralCodeView,P extends SubmitReferralCodePresenter<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.referral.ui.submitreferral.SubmitReferralCodeFragment<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
,com.cheetahdigital.corekit.sdk.analytics.AnalyticsManager.AnalyticsScreen
,SubmitReferralCodeView
,com.cheetahdigital.uikit.architecture.lce.LceView
,com.cheetahdigital.uikit.architecture.lce.MvpLceView
,com.cheetahdigital.uikit.architecture.mvp.MvpView
,com.cheetahdigital.uikit.widget.fragments.NotifyDialogFragment.NotifyDialogListener
public class SubmitReferralCodeFragment<V extends SubmitReferralCodeView,P extends SubmitReferralCodePresenter<V>> extends com.cheetahdigital.uikit.architecture.lce.LceFragmentView<V,P> implements SubmitReferralCodeView, com.cheetahdigital.uikit.widget.fragments.NotifyDialogFragment.NotifyDialogListener
Fragment class for submittingReferralCode
code. Can receive the following intent extras:IntentKey.PRIMARY_PARAMS
- instance ofReferralParams
used forReferralAPI
-
-
Constructor Summary
Constructors Constructor Description SubmitReferralCodeFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
android.view.View
onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
void
onNotify(java.lang.String tag)
void
onSubmissionRejected()
Callback after a rejected referral code submissionvoid
showReferralDialog()
Callback after a successful referral code submission.void
showReferralErrorDialog(java.lang.String error)
Callback after a failed referral code submissionvoid
submitCode()
Submit Referral Code-
Methods inherited from class com.cheetahdigital.uikit.architecture.lce.LceFragmentView
onLoadFailed, onLoadSuccess, onViewCreated, setErrorViewClickListener, showContent, showError, showLoading
-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
captureSharedElementValues, getPresenter, getSharedElementViews, initSharedElementValues, isSharedAnimationEnabled, onAttach, onDestroyView, startActivity, startActivityForResult
-
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, 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, 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
-
-
-
-
Method Detail
-
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 SubmitReferralCodeView,P extends SubmitReferralCodePresenter<V>>
- Returns:
- id of the content layout
-
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 SubmitReferralCodeView,P extends SubmitReferralCodePresenter<V>>
- Returns:
- return the
MvpBasePresenter
-
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.architecture.lce.LceFragmentView<V extends SubmitReferralCodeView,P extends SubmitReferralCodePresenter<V>>
-
submitCode
public void submitCode()
Submit Referral Code
-
showReferralDialog
public void showReferralDialog()
Description copied from interface:SubmitReferralCodeView
Callback after a successful referral code submission.- Specified by:
showReferralDialog
in interfaceSubmitReferralCodeView
-
showReferralErrorDialog
public void showReferralErrorDialog(java.lang.String error)
Description copied from interface:SubmitReferralCodeView
Callback after a failed referral code submission- Specified by:
showReferralErrorDialog
in interfaceSubmitReferralCodeView
- Parameters:
error
- Error text
-
onSubmissionRejected
public void onSubmissionRejected()
Description copied from interface:SubmitReferralCodeView
Callback after a rejected referral code submission- Specified by:
onSubmissionRejected
in interfaceSubmitReferralCodeView
-
onNotify
public void onNotify(java.lang.String tag)
- Specified by:
onNotify
in interfacecom.cheetahdigital.uikit.widget.fragments.NotifyDialogFragment.NotifyDialogListener
-
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 SubmitReferralCodeView,P extends SubmitReferralCodePresenter<V>>
-
-