Skip to content

SdkQuestionNumericView

Hudson_BuildService edited this page Jan 9, 2026 · 1 revision

SdkQuestionNumericView displays Numeric question node where users can enter integer or decimal values using a numeric keyboard.

Appearance

Basic Usage

Android

import com.confirmit.mobilesdk.components.dialogs.questionViews.SdkQuestionNumericView
import com.confirmit.mobilesdk.ui.questions.NumericQuestion
import android.graphics.Color

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

iOS

import ConfirmitMobileSDK

class SurveyViewController: UIViewController, SurveyFrameDelegate {
    
    func onSurveyPageReady(page: SurveyPage) {
        for question in page.questions {
            if let numericQuestion = question as? NumericQuestion {
                let numericView = SdkQuestionNumericView(question: numericQuestion)
                numericView.themeColor = .systemBlue
                numericView.setup()
                questionStackView.addArrangedSubview(numericView)
            }
        }
    }
}

Properties

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

Methods

setup()

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

Clone this wiki locally