Class TextQuestionFragment
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- com.cheetahdigital.challenges.ui.responses.multiquestion.base.QuestionFragment
-
- com.cheetahdigital.challenges.ui.responses.multiquestion.text.TextQuestionFragment
-
- All Implemented Interfaces:
android.content.ComponentCallbacks
,android.view.View.OnCreateContextMenuListener
,androidx.activity.result.ActivityResultCaller
,androidx.lifecycle.HasDefaultViewModelProviderFactory
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
- Direct Known Subclasses:
NumericQuestionFragment
public class TextQuestionFragment extends QuestionFragment
Class for theMultiChoiceQuestionFragment
text questions
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.challenges.ui.responses.multiquestion.base.QuestionFragment
DEFINITION_KEY, IS_SURVEY_QUIZ_KEY, TAG
-
-
Constructor Summary
Constructors Constructor Description TextQuestionFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Answer>
getAnswer()
Returns answers to the questionsint
getContentLayoutId()
Provide the Content Layout ID which is of a Layout Resource Reference of Androidvoid
onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)
void
showQuestion(Definition definition)
Show question-
Methods inherited from class com.cheetahdigital.challenges.ui.responses.multiquestion.base.QuestionFragment
isSurveyQuiz, onActivityCreated, onCreate, onCreateView
-
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, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDestroyView, 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, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
-
-
-
-
Method Detail
-
getContentLayoutId
public int getContentLayoutId()
Description copied from class:QuestionFragment
Provide the Content Layout ID which is of a Layout Resource Reference of Android- Specified by:
getContentLayoutId
in classQuestionFragment
- Returns:
- resource id of the layout used
-
onViewCreated
public void onViewCreated(@NonNull android.view.View view, @Nullable android.os.Bundle savedInstanceState)
- Overrides:
onViewCreated
in classandroidx.fragment.app.Fragment
-
showQuestion
public void showQuestion(Definition definition)
Description copied from class:QuestionFragment
Show question- Specified by:
showQuestion
in classQuestionFragment
- Parameters:
definition
- questionDefinition
-
getAnswer
public java.util.List<Answer> getAnswer()
Description copied from class:QuestionFragment
Returns answers to the questions- Specified by:
getAnswer
in classQuestionFragment
- Returns:
- list of
Answer
-
-