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 theFeedbackFragmentCan receive the following intent extra:IntentKey.PRIMARY_PARAMS=FeedbackParamsto use forFeedbackAPISUCCESS_MESSAGE_TITLE= custom title for the success messageSUCCESS_MESSAGE= success message
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSUCCESS_MESSAGEstatic java.lang.StringSUCCESS_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 PcreatePresenter()InstantiateMvpFragmentView.mPresenterto be used for thisMvpActivityViewprotected intgetContentLayoutId()Provide the Content Layout ID which is of a Layout Resource Reference of Androidandroid.view.ViewonCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)voidshowProgressDialog(boolean show)Show/Hide progress dialogvoidshowSubmitFailedDialog(java.lang.String message)Notifies the view when call to feedback API failedvoidshowSubmitSuccessDialog()Notifies the view when call to feedback API is successfulvoidupdateSpinnerCategories(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:
onCreateViewin classLceFragmentView<V extends FeedbackView,P extends FeedbackPresenter<V>>
-
createPresenter
protected P createPresenter()
Description copied from class:MvpFragmentViewInstantiateMvpFragmentView.mPresenterto be used for thisMvpActivityView- Specified by:
createPresenterin classMvpFragmentView<V extends FeedbackView,P extends FeedbackPresenter<V>>- Returns:
- return the
MvpBasePresenter
-
showProgressDialog
public void showProgressDialog(boolean show)
Description copied from interface:FeedbackViewShow/Hide progress dialog- Specified by:
showProgressDialogin interfaceFeedbackView- Parameters:
show-trueto show, else false
-
getContentLayoutId
protected int getContentLayoutId()
Description copied from class:MvpFragmentViewProvide the Content Layout ID which is of a Layout Resource Reference of Android- Specified by:
getContentLayoutIdin classMvpFragmentView<V extends FeedbackView,P extends FeedbackPresenter<V>>- Returns:
- id of the content layout
-
showSubmitSuccessDialog
public void showSubmitSuccessDialog()
Description copied from interface:FeedbackViewNotifies the view when call to feedback API is successful- Specified by:
showSubmitSuccessDialogin interfaceFeedbackView
-
showSubmitFailedDialog
public void showSubmitFailedDialog(java.lang.String message)
Description copied from interface:FeedbackViewNotifies the view when call to feedback API failed- Specified by:
showSubmitFailedDialogin interfaceFeedbackView- Parameters:
message- error message
-
updateSpinnerCategories
public void updateSpinnerCategories(java.util.HashMap<java.lang.String,Category> categoryList)
Description copied from interface:FeedbackViewNotifies the view when call to GET categories API is successful- Specified by:
updateSpinnerCategoriesin interfaceFeedbackView- Parameters:
categoryList- category list
-
-