Class RetroclaimFragment<V extends RetroclaimView,P extends RetroclaimPresenter<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.orders.ui.retroclaim.RetroclaimFragment<V,P>
-
- Type Parameters:
V
- subclass of theRetroclaimView
, if needed to be overriddenP
- subclass of theRetroclaimPresenter
if needed to be overridden
- All Implemented Interfaces:
android.content.ComponentCallbacks
,android.view.View.OnCreateContextMenuListener
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
,AnalyticsManager.AnalyticsScreen
,RetroclaimView
,LceView
,MvpLceView
,MvpView
public class RetroclaimFragment<V extends RetroclaimView,P extends RetroclaimPresenter<V>> extends LceFragmentView<V,P> implements RetroclaimView
Fragment to be used for Retroclaim activity
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.uikit.architecture.lce.LceFragmentView
mContentView, mErrorView, mInitialLoad, mLoadingView
-
-
Constructor Summary
Constructors Constructor Description RetroclaimFragment()
-
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 Androidandroid.view.View
onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
protected void
onSubmitClicked()
Method called when the submit button is clickedprotected void
onSuccessAction()
Method called when the OK button is clicked on the success dialogvoid
showChargedAmountValidationError(java.lang.Integer error)
Handler for validation of charge amount fieldvoid
showClaimError(int errorCode, java.lang.String errorMessage)
Handler for failed retroclaimvoid
showClaimStub(Retroclaim claimStub)
Handler for successful Retroclaim requestvoid
showDateValidationError(java.lang.Integer error)
Handler for validation of the business date fieldvoid
showIdValidationError(java.lang.Integer error)
Handler for validation of transaction idvoid
showLastDigitValidateError(java.lang.Integer error)
Handler for validation of cc last digit fieldvoid
showLoading(boolean show)
UI handler for showing the progress / loading dialogvoid
showPlaceValidationError(java.lang.Integer error)
Handler for validation of place / store fieldvoid
showRegisterValidationError(java.lang.Integer error)
Handler for validation of register fieldvoid
showSubtotalValidationError(java.lang.Integer error)
Handler for validation of the subtotal fieldvoid
showTotalValidationError(java.lang.Integer error)
Handler for validation of total amount field-
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, 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
-
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 classLceFragmentView<V extends RetroclaimView,P extends RetroclaimPresenter<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 RetroclaimView,P extends RetroclaimPresenter<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 RetroclaimView,P extends RetroclaimPresenter<V>>
- Returns:
- return the
MvpBasePresenter
-
showIdValidationError
public void showIdValidationError(java.lang.Integer error)
Description copied from interface:RetroclaimView
Handler for validation of transaction id- Specified by:
showIdValidationError
in interfaceRetroclaimView
- Parameters:
error
- resource id for the error string
-
showPlaceValidationError
public void showPlaceValidationError(java.lang.Integer error)
Description copied from interface:RetroclaimView
Handler for validation of place / store field- Specified by:
showPlaceValidationError
in interfaceRetroclaimView
- Parameters:
error
- resource id for the error string
-
showDateValidationError
public void showDateValidationError(java.lang.Integer error)
Description copied from interface:RetroclaimView
Handler for validation of the business date field- Specified by:
showDateValidationError
in interfaceRetroclaimView
- Parameters:
error
- resource id for the error string
-
showSubtotalValidationError
public void showSubtotalValidationError(java.lang.Integer error)
Description copied from interface:RetroclaimView
Handler for validation of the subtotal field- Specified by:
showSubtotalValidationError
in interfaceRetroclaimView
- Parameters:
error
- resource id for the error string
-
showRegisterValidationError
public void showRegisterValidationError(java.lang.Integer error)
Description copied from interface:RetroclaimView
Handler for validation of register field- Specified by:
showRegisterValidationError
in interfaceRetroclaimView
- Parameters:
error
- resource id for the error string
-
showLastDigitValidateError
public void showLastDigitValidateError(java.lang.Integer error)
Description copied from interface:RetroclaimView
Handler for validation of cc last digit field- Specified by:
showLastDigitValidateError
in interfaceRetroclaimView
- Parameters:
error
- resource id for the error string
-
showTotalValidationError
public void showTotalValidationError(java.lang.Integer error)
Description copied from interface:RetroclaimView
Handler for validation of total amount field- Specified by:
showTotalValidationError
in interfaceRetroclaimView
- Parameters:
error
- resource id for the error string
-
showChargedAmountValidationError
public void showChargedAmountValidationError(java.lang.Integer error)
Description copied from interface:RetroclaimView
Handler for validation of charge amount field- Specified by:
showChargedAmountValidationError
in interfaceRetroclaimView
- Parameters:
error
- resource id for the error string
-
showClaimStub
public void showClaimStub(Retroclaim claimStub)
Description copied from interface:RetroclaimView
Handler for successful Retroclaim request- Specified by:
showClaimStub
in interfaceRetroclaimView
- Parameters:
claimStub
- theRetroclaim
object response
-
showClaimError
public void showClaimError(int errorCode, java.lang.String errorMessage)
Description copied from interface:RetroclaimView
Handler for failed retroclaim- Specified by:
showClaimError
in interfaceRetroclaimView
- Parameters:
errorCode
- error codeerrorMessage
- error message
-
onSubmitClicked
protected void onSubmitClicked()
Method called when the submit button is clicked
-
onSuccessAction
protected void onSuccessAction()
Method called when the OK button is clicked on the success dialog
-
showLoading
public void showLoading(boolean show)
Description copied from interface:RetroclaimView
UI handler for showing the progress / loading dialog- Specified by:
showLoading
in interfaceRetroclaimView
- Parameters:
show
- true to show the dialog, otherwise false
-
-