Search in sources :

Example 1 with SelectOneImageMapWidget

use of org.odk.collect.android.widgets.items.SelectOneImageMapWidget in project collect by opendatakit.

the class WidgetFactory method getSelectOneWidget.

private QuestionWidget getSelectOneWidget(String appearance, QuestionDetails questionDetails) {
    final QuestionWidget questionWidget;
    boolean isQuick = appearance.contains(Appearances.QUICK);
    // considered in each widget by calls to ExternalDataUtil.getSearchXPathExpression.
    if (appearance.contains(Appearances.MINIMAL)) {
        questionWidget = new SelectOneMinimalWidget(activity, questionDetails, isQuick, waitingForDataRegistry);
    } else if (appearance.contains(Appearances.LIKERT)) {
        questionWidget = new LikertWidget(activity, questionDetails);
    } else if (appearance.contains(Appearances.LIST_NO_LABEL)) {
        questionWidget = new ListWidget(activity, questionDetails, false, isQuick);
    } else if (appearance.contains(Appearances.LIST)) {
        questionWidget = new ListWidget(activity, questionDetails, true, isQuick);
    } else if (appearance.contains(Appearances.LABEL)) {
        questionWidget = new LabelWidget(activity, questionDetails);
    } else if (appearance.contains(Appearances.IMAGE_MAP)) {
        questionWidget = new SelectOneImageMapWidget(activity, questionDetails, isQuick);
    } else {
        questionWidget = new SelectOneWidget(activity, questionDetails, isQuick);
    }
    return questionWidget;
}
Also used : SelectOneWidget(org.odk.collect.android.widgets.items.SelectOneWidget) SelectOneMinimalWidget(org.odk.collect.android.widgets.items.SelectOneMinimalWidget) ListWidget(org.odk.collect.android.widgets.items.ListWidget) LabelWidget(org.odk.collect.android.widgets.items.LabelWidget) LikertWidget(org.odk.collect.android.widgets.items.LikertWidget) SelectOneImageMapWidget(org.odk.collect.android.widgets.items.SelectOneImageMapWidget)

Aggregations

LabelWidget (org.odk.collect.android.widgets.items.LabelWidget)1 LikertWidget (org.odk.collect.android.widgets.items.LikertWidget)1 ListWidget (org.odk.collect.android.widgets.items.ListWidget)1 SelectOneImageMapWidget (org.odk.collect.android.widgets.items.SelectOneImageMapWidget)1 SelectOneMinimalWidget (org.odk.collect.android.widgets.items.SelectOneMinimalWidget)1 SelectOneWidget (org.odk.collect.android.widgets.items.SelectOneWidget)1