QuestionnaireItemEditTextViewHolderDelegate

abstract class QuestionnaireItemEditTextViewHolderDelegate(rawInputType: Int) : QuestionnaireItemViewHolderDelegate

Functions

Link copied to clipboard
open override fun bind(questionnaireItemViewItem: QuestionnaireItemViewItem)

Binds a QuestionnaireItemViewItem to the view.

Link copied to clipboard
open override fun displayValidationResult(validationResult: ValidationResult)

Displays validation messages on the view.

Link copied to clipboard
abstract fun getText(answer: <ERROR CLASS>?): String

Returns the text that should be displayed in the TextInputEditText from the existing answer to the question (may be input by the user or previously recorded).

Link copied to clipboard
abstract fun getValue(text: String): <ERROR CLASS>?

Returns the answer that should be recorded given the text input by the user.

Link copied to clipboard
open override fun init(itemView: <ERROR CLASS>)

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

Link copied to clipboard
open fun isTextUpdatesRequired(answerText: String, inputText: String): Boolean
Link copied to clipboard
open override fun setReadOnly(isReadOnly: Boolean)

Sets view read only if isReadOnly is true.

Properties

Link copied to clipboard
open lateinit override var questionnaireItemViewItem: QuestionnaireItemViewItem