getRequiredOrOptionalText

fun getRequiredOrOptionalText(questionnaireViewItem: QuestionnaireViewItem, context: Context): String?

Returns R.string.required if QuestionnaireViewItem.showRequiredText and Questionnaire.QuestionnaireItemComponent.required is true, or R.string.optional_text if QuestionnaireViewItem.showOptionalText is true.