Class MultiQuestionFragment<V extends MultiQuestionView,​P extends MultiQuestionPresenter<V>>

  • All Implemented Interfaces:
    android.content.ComponentCallbacks, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, androidx.activity.result.ActivityResultCaller, androidx.lifecycle.HasDefaultViewModelProviderFactory, androidx.lifecycle.LifecycleOwner, androidx.lifecycle.ViewModelStoreOwner, androidx.savedstate.SavedStateRegistryOwner, ChallengeResponseView, MultiQuestionView, com.cheetahdigital.corekit.sdk.analytics.AnalyticsManager.AnalyticsScreen, com.cheetahdigital.uikit.architecture.mvp.MvpView

    public class MultiQuestionFragment<V extends MultiQuestionView,​P extends MultiQuestionPresenter<V>>
    extends ChallengeResponseFragment<V,​P>
    implements MultiQuestionView
    The response screen for Multi Question type Challenge Can receive the following intent extras:
    • Nested Class Summary

      • Nested classes/interfaces inherited from class androidx.fragment.app.Fragment

        androidx.fragment.app.Fragment.InstantiationException, androidx.fragment.app.Fragment.SavedState
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected P createPresenter()
      Instantiate MvpFragmentView.mPresenter to be used for this MvpActivityView
      protected int getContentLayoutId()
      Provide the Content Layout ID which is of a Layout Resource Reference of Android
      void nextQuestion()
      Show the next question
      void onActivityCreated​(android.os.Bundle savedInstanceState)  
      void onClick​(android.view.View view)  
      void onViewCreated​(android.view.View view, android.os.Bundle savedInstanceState)  
      void prevQuestion()
      show the previous question
      void showControls​(int pageCount)
      Notifies the view to show view pager controls
      void showQuestions​(java.util.List<Definition> definitions)
      Notifies the view to show the questions
      void showSubmit​(boolean show)
      Notifies the view to show the submit button
      void submitChallenge()
      Submit challenge response
      • 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, 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, 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, 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
    • Constructor Detail

      • MultiQuestionFragment

        public MultiQuestionFragment()
    • 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 class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V extends MultiQuestionView,​P extends MultiQuestionPresenter<V>>
        Returns:
        id of the content layout
      • createPresenter

        protected P createPresenter()
        Description copied from class: com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
        Instantiate MvpFragmentView.mPresenter to be used for this MvpActivityView
        Specified by:
        createPresenter in class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V extends MultiQuestionView,​P extends MultiQuestionPresenter<V>>
        Returns:
        return the MvpBasePresenter
      • onActivityCreated

        public void onActivityCreated​(@Nullable
                                      android.os.Bundle savedInstanceState)
        Overrides:
        onActivityCreated in class androidx.fragment.app.Fragment
      • showQuestions

        public void showQuestions​(java.util.List<Definition> definitions)
        Description copied from interface: MultiQuestionView
        Notifies the view to show the questions
        Specified by:
        showQuestions in interface MultiQuestionView
        Parameters:
        definitions - list of questions
      • showControls

        public void showControls​(int pageCount)
        Description copied from interface: MultiQuestionView
        Notifies the view to show view pager controls
        Specified by:
        showControls in interface MultiQuestionView
        Parameters:
        pageCount - number of questions
      • showSubmit

        public void showSubmit​(boolean show)
        Description copied from interface: MultiQuestionView
        Notifies the view to show the submit button
        Specified by:
        showSubmit in interface MultiQuestionView
        Parameters:
        show - true to display, false otherwise
      • nextQuestion

        public void nextQuestion()
        Show the next question
      • prevQuestion

        public void prevQuestion()
        show the previous question