QuestionnaireItemEditTextViewHolderDelegate

Constructors

constructor(rawInputType: Int)

Properties

Link copied to clipboard
open lateinit override var questionnaireViewItem: QuestionnaireViewItem

Functions

Link copied to clipboard
open override fun bind(questionnaireViewItem: QuestionnaireViewItem)

Binds a QuestionnaireViewItem to the view. This should update the UI to display the question, the answer, and any validation result.

Link copied to clipboard
abstract suspend fun handleInput(editable: Editable, questionnaireViewItem: QuestionnaireViewItem)

Handles user input from the editable and updates the questionnaire.

Link copied to clipboard
open override fun init(itemView: View)

Initializes the view in QuestionnaireItemViewHolder. Any listeners to record user input should be set in this function.

Link copied to clipboard
open override fun setReadOnly(isReadOnly: Boolean)

Sets view read only if isReadOnly is true.

Link copied to clipboard
abstract fun updateInputTextUI(questionnaireViewItem: QuestionnaireViewItem, textInputEditText: TextInputEditText)

Handles the update of textInputEditText.text.

Link copied to clipboard
abstract fun updateValidationTextUI(questionnaireViewItem: QuestionnaireViewItem, textInputLayout: TextInputLayout)

Handles the update of textInputLayout.error.