Search in sources :

Example 1 with AKeyboardQuestionView

use of org.eyeseetea.malariacare.views.question.AKeyboardQuestionView in project pictureapp by EyeSeeTea.

the class DynamicTabAdapter method configureAnswerChangedListener.

private void configureAnswerChangedListener(IQuestionView questionView) {
    if (questionView instanceof AKeyboardQuestionView) {
        ((AKeyboardQuestionView) questionView).setOnAnswerChangedListener(new QuestionAnswerChangedListener(tableLayout, this, !GradleVariantConfig.isButtonNavigationActive()));
    } else if (questionView instanceof AOptionQuestionView) {
        ((AOptionQuestionView) questionView).setOnAnswerChangedListener(new QuestionAnswerChangedListener(tableLayout, this, !GradleVariantConfig.isButtonNavigationActive()));
    } else if (questionView instanceof NumberRadioButtonMultiquestionView) {
        ((NumberRadioButtonMultiquestionView) questionView).setOnAnswerChangedListener(new QuestionAnswerChangedListener(tableLayout, this, !GradleVariantConfig.isButtonNavigationActive()));
        ((NumberRadioButtonMultiquestionView) questionView).setOnAnswerOptionChangedListener(new QuestionAnswerChangedListener(tableLayout, this, !GradleVariantConfig.isButtonNavigationActive()));
    } else if (questionView instanceof DynamicStockImageRadioButtonSingleQuestionView) {
        ((DynamicStockImageRadioButtonSingleQuestionView) questionView).setOnAnswerChangedListener(new QuestionAnswerChangedListener(tableLayout, this, !GradleVariantConfig.isButtonNavigationActive()));
        ((DynamicStockImageRadioButtonSingleQuestionView) questionView).setOnAnswerOptionChangedListener(new QuestionAnswerChangedListener(tableLayout, this, !GradleVariantConfig.isButtonNavigationActive()));
    }
}
Also used : AKeyboardQuestionView(org.eyeseetea.malariacare.views.question.AKeyboardQuestionView) AOptionQuestionView(org.eyeseetea.malariacare.views.question.AOptionQuestionView) NumberRadioButtonMultiquestionView(org.eyeseetea.malariacare.views.question.multiquestion.NumberRadioButtonMultiquestionView) DynamicStockImageRadioButtonSingleQuestionView(org.eyeseetea.malariacare.views.question.singlequestion.DynamicStockImageRadioButtonSingleQuestionView) QuestionAnswerChangedListener(org.eyeseetea.malariacare.layout.listeners.question.QuestionAnswerChangedListener)

Aggregations

QuestionAnswerChangedListener (org.eyeseetea.malariacare.layout.listeners.question.QuestionAnswerChangedListener)1 AKeyboardQuestionView (org.eyeseetea.malariacare.views.question.AKeyboardQuestionView)1 AOptionQuestionView (org.eyeseetea.malariacare.views.question.AOptionQuestionView)1 NumberRadioButtonMultiquestionView (org.eyeseetea.malariacare.views.question.multiquestion.NumberRadioButtonMultiquestionView)1 DynamicStockImageRadioButtonSingleQuestionView (org.eyeseetea.malariacare.views.question.singlequestion.DynamicStockImageRadioButtonSingleQuestionView)1