Skip to content

SdkQuestionTextView

Hudson_BuildService edited this page Jan 9, 2026 · 1 revision

SdkQuestionTextView displays Text question node where users can enter text responses using a multi-line text area.

Appearance

Basic Usage

Android

import com.confirmit.mobilesdk.components.dialogs.questionViews.SdkQuestionTextView
import com.confirmit.mobilesdk.ui.questions.TextQuestion
import android.graphics.Color

class MySurveyActivity : Activity(), SurveyFrameCallback {
    
    override fun onSurveyPageReady(page: SurveyPage) {
        for (question in page.questions) {
            if (question is TextQuestion) {
                val textView = SdkQuestionTextView(this, question)
                textView.themeColor = Color.BLUE
                textView.setup()
                questionContainer.addView(textView)
            }
        }
    }
}

iOS

import ConfirmitMobileSDK

class SurveyViewController: UIViewController, SurveyFrameDelegate {
    
    func onSurveyPageReady(page: SurveyPage) {
        for question in page.questions {
            if let textQuestion = question as? TextQuestion {
                let textView = SdkQuestionTextView(question: textQuestion)
                textView.themeColor = .systemBlue
                textView.setup()
                questionStackView.addArrangedSubview(textView)
            }
        }
    }
}

Properties

Property Type (Android / iOS) Description
question TextQuestion The text question object containing validation rules and current value
themeColor Int / UIColor Accent color for text area border/underline when focused

Methods

setup()

Initializes and configures the text area with the question text and current value.

Clone this wiki locally