コード例 #1
0
 private void initInputControlOptions() {
   List<InputControl> inputControls =
       paramsStorage.getInputControlHolder(reportUri).getInputControls();
   for (InputControl inputControl : inputControls) {
     if (inputControl.getId().equals(inputControlId)) {
       mInputControlLabel = inputControl.getLabel();
       mInputControlOptions = inputControl.getState().getOptions();
       break;
     }
   }
 }
コード例 #2
0
 @Override
 protected String getCurrentValue(InputControl inputControl) {
   List<String> selectionList = new ArrayList<>();
   for (InputControlOption option : inputControl.getState().getOptions()) {
     if (option.isSelected()) {
       selectionList.add(option.getLabel());
       if (selectionList.size() > ITEM_TO_SHOW_MAX_COUNT) break;
     }
   }
   return selectionList.isEmpty()
       ? InputControlWrapper.NOTHING_SUBSTITUTE_LABEL
       : TextUtils.join(", ", selectionList);
 }