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;
}
Aggregations