Package com.cheetahdigital.feedback.ui
Class FeedbackFragment<V extends FeedbackView,P extends FeedbackPresenter<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.feedback.ui.FeedbackFragment<V,P>
-
- All Implemented Interfaces:
android.content.ComponentCallbacks
,android.view.View.OnCreateContextMenuListener
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
,AnalyticsManager.AnalyticsScreen
,FeedbackView
,LceView
,MvpLceView
,MvpView
public class FeedbackFragment<V extends FeedbackView,P extends FeedbackPresenter<V>> extends LceFragmentView<V,P> implements FeedbackView
This fragment shows theFeedbackFragment
Can receive the following intent extra:IntentKey.PRIMARY_PARAMS
=FeedbackParams
to use forFeedbackAPI
SUCCESS_MESSAGE_TITLE
= custom title for the success messageSUCCESS_MESSAGE
= success message
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SUCCESS_MESSAGE
static java.lang.String
SUCCESS_MESSAGE_TITLE
-
Fields inherited from class com.cheetahdigital.uikit.architecture.lce.LceFragmentView
mContentView, mErrorView, mInitialLoad, mLoadingView
-
-
Constructor Summary
Constructors Constructor Description FeedbackFragment()
-
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)
void
showProgressDialog(boolean show)
Show/Hide progress dialogvoid
showSubmitFailedDialog(java.lang.String message)
Notifies the view when call to feedback API failedvoid
showSubmitSuccessDialog()
Notifies the view when call to feedback API is successfulvoid
updateSpinnerCategories(java.util.HashMap<java.lang.String,Category> categoryList)
Notifies the view when call to GET categories API is successful-
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
-
-
-
-
Field Detail
-
SUCCESS_MESSAGE_TITLE
public static final java.lang.String SUCCESS_MESSAGE_TITLE
- See Also:
- Constant Field Values
-
SUCCESS_MESSAGE
public static final java.lang.String SUCCESS_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
onCreateView
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
- Overrides:
onCreateView
in classLceFragmentView<V extends FeedbackView,P extends FeedbackPresenter<V>>
-
createPresenter
protected P createPresenter()
Description copied from class:MvpFragmentView
InstantiateMvpFragmentView.mPresenter
to be used for thisMvpActivityView
- Specified by:
createPresenter
in classMvpFragmentView<V extends FeedbackView,P extends FeedbackPresenter<V>>
- Returns:
- return the
MvpBasePresenter
-
showProgressDialog
public void showProgressDialog(boolean show)
Description copied from interface:FeedbackView
Show/Hide progress dialog- Specified by:
showProgressDialog
in interfaceFeedbackView
- Parameters:
show
-true
to show, else false
-
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 FeedbackView,P extends FeedbackPresenter<V>>
- Returns:
- id of the content layout
-
showSubmitSuccessDialog
public void showSubmitSuccessDialog()
Description copied from interface:FeedbackView
Notifies the view when call to feedback API is successful- Specified by:
showSubmitSuccessDialog
in interfaceFeedbackView
-
showSubmitFailedDialog
public void showSubmitFailedDialog(java.lang.String message)
Description copied from interface:FeedbackView
Notifies the view when call to feedback API failed- Specified by:
showSubmitFailedDialog
in interfaceFeedbackView
- Parameters:
message
- error message
-
updateSpinnerCategories
public void updateSpinnerCategories(java.util.HashMap<java.lang.String,Category> categoryList)
Description copied from interface:FeedbackView
Notifies the view when call to GET categories API is successful- Specified by:
updateSpinnerCategories
in interfaceFeedbackView
- Parameters:
categoryList
- category list
-
-