Class MultiQuestionFragment<V extends MultiQuestionView,P extends MultiQuestionPresenter<V>>
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V,P>
-
- com.cheetahdigital.challenges.ui.responses.base.ChallengeResponseFragment<V,P>
-
- com.cheetahdigital.challenges.ui.responses.multiquestion.MultiQuestionFragment<V,P>
-
- All Implemented Interfaces:
android.content.ComponentCallbacks,android.view.View.OnClickListener,android.view.View.OnCreateContextMenuListener,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner,ChallengeResponseView,MultiQuestionView,AnalyticsManager.AnalyticsScreen,MvpView
public class MultiQuestionFragment<V extends MultiQuestionView,P extends MultiQuestionPresenter<V>> extends ChallengeResponseFragment<V,P> implements MultiQuestionView
The response screen for Multi Question typeChallengeCan receive the following intent extras:QuestionFragment.IS_SURVEY_QUIZ_KEY- true if the fragment was used as a survey quiz from view content challenges
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.challenges.ui.responses.base.ChallengeResponseFragment
CHALLENGE_ENABLE_RATING, CHALLENGE_FROM_DIALOG, CHALLENGE_ID_KEY, CHALLENGE_KEY, mProgressDialog, mShowAsAlert, mSubmitButton, RESPONDABLE_KEY, RESPONSE_ID_KEY, TAG
-
-
Constructor Summary
Constructors Constructor Description MultiQuestionFragment()
-
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 AndroidvoidnextQuestion()Show the next questionvoidonActivityCreated(android.os.Bundle savedInstanceState)voidonClick(android.view.View view)voidonViewCreated(android.view.View view, android.os.Bundle savedInstanceState)voidprevQuestion()show the previous questionvoidshowControls(int pageCount)Notifies the view to show view pager controlsvoidshowQuestions(java.util.List<Definition> definitions)Notifies the view to show the questionsvoidshowSubmit(boolean show)Notifies the view to show the submit buttonvoidsubmitChallenge()Submit challenge response-
Methods inherited from class com.cheetahdigital.challenges.ui.responses.base.ChallengeResponseFragment
getChallenge, getChallengeIdentifier, getResponseIdentifier, getRewardString, isAlert, onChallengeRespondSuccess, onCreate, sendRespondSuccessFragmentResult, showErrorMessage, showLoading, showReward
-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
captureSharedElementValues, getPresenter, getScreenName, getSharedElementViews, initSharedElementValues, isSharedAnimationEnabled, onAttach, onCreateView, 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, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, 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.challenges.ui.responses.base.ChallengeResponseView
onChallengeRespondSuccess, showErrorMessage, showLoading, showReward
-
-
-
-
Method Detail
-
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 MultiQuestionView,P extends MultiQuestionPresenter<V>>- Returns:
- id of the content layout
-
createPresenter
protected P createPresenter()
Description copied from class:MvpFragmentViewInstantiateMvpFragmentView.mPresenterto be used for thisMvpActivityView- Specified by:
createPresenterin classMvpFragmentView<V extends MultiQuestionView,P extends MultiQuestionPresenter<V>>- Returns:
- return the
MvpBasePresenter
-
onViewCreated
public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)- Overrides:
onViewCreatedin classChallengeResponseFragment<V extends MultiQuestionView,P extends MultiQuestionPresenter<V>>
-
onActivityCreated
public void onActivityCreated(@Nullable android.os.Bundle savedInstanceState)- Overrides:
onActivityCreatedin classandroidx.fragment.app.Fragment
-
showQuestions
public void showQuestions(java.util.List<Definition> definitions)
Description copied from interface:MultiQuestionViewNotifies the view to show the questions- Specified by:
showQuestionsin interfaceMultiQuestionView- Parameters:
definitions- list of questions
-
showControls
public void showControls(int pageCount)
Description copied from interface:MultiQuestionViewNotifies the view to show view pager controls- Specified by:
showControlsin interfaceMultiQuestionView- Parameters:
pageCount- number of questions
-
showSubmit
public void showSubmit(boolean show)
Description copied from interface:MultiQuestionViewNotifies the view to show the submit button- Specified by:
showSubmitin interfaceMultiQuestionView- Parameters:
show- true to display, false otherwise
-
submitChallenge
public void submitChallenge()
Description copied from class:ChallengeResponseFragmentSubmit challenge response- Specified by:
submitChallengein classChallengeResponseFragment<V extends MultiQuestionView,P extends MultiQuestionPresenter<V>>
-
onClick
public void onClick(android.view.View view)
- Specified by:
onClickin interfaceandroid.view.View.OnClickListener- Overrides:
onClickin classChallengeResponseFragment<V extends MultiQuestionView,P extends MultiQuestionPresenter<V>>
-
nextQuestion
public void nextQuestion()
Show the next question
-
prevQuestion
public void prevQuestion()
show the previous question
-
-