Search in sources :

Example 1 with RangePickerIntegerWidget

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

the class FormEntryActivity method onNumberPickerValueSelected.

@Override
public void onNumberPickerValueSelected(int widgetId, int value) {
    if (currentView != null) {
        for (QuestionWidget qw : ((ODKView) currentView).getWidgets()) {
            if (qw instanceof RangePickerIntegerWidget && widgetId == qw.getId()) {
                ((RangePickerIntegerWidget) qw).setNumberPickerValue(value);
                widgetValueChanged(qw);
                return;
            } else if (qw instanceof RangePickerDecimalWidget && widgetId == qw.getId()) {
                ((RangePickerDecimalWidget) qw).setNumberPickerValue(value);
                widgetValueChanged(qw);
                return;
            }
        }
    }
}
Also used : RangePickerIntegerWidget(org.odk.collect.android.widgets.RangePickerIntegerWidget) ODKView(org.odk.collect.android.formentry.ODKView) RangePickerDecimalWidget(org.odk.collect.android.widgets.RangePickerDecimalWidget) QuestionWidget(org.odk.collect.android.widgets.QuestionWidget)

Aggregations

ODKView (org.odk.collect.android.formentry.ODKView)1 QuestionWidget (org.odk.collect.android.widgets.QuestionWidget)1 RangePickerDecimalWidget (org.odk.collect.android.widgets.RangePickerDecimalWidget)1 RangePickerIntegerWidget (org.odk.collect.android.widgets.RangePickerIntegerWidget)1