Пример #1
0
 @Override
 public void onStopTrackingTouch(SeekBar seekBar) {
   SeekBarEx seekBarEx = (SeekBarEx) seekBar;
   Attribute attribute = (Attribute) seekBar.getTag();
   if (attribute != null) {
     attribute.setValue(seekBarEx.getValue());
   }
 }
Пример #2
0
  public boolean checkValue(Integer newRefValue) {
    boolean changed = false;

    if (!Util.equalsOrNull(getReferenceValue(), newRefValue)) {
      setReferenceValue(newRefValue);
      changed = true;
    }
    Integer value = getValue();
    if (value != null) {
      int max = getMaximum();
      int min = getMinimum();
      if (value > max) {
        setValue(max);
        changed = true;
      } else if (value < min) {
        setValue(min);
        changed = true;
      }
    }
    return changed;
  }
Пример #3
0
 /*
  * (non-Javadoc)
  *
  * @see com.dsatab.data.Value#reset()
  */
 @Override
 public void reset() {
   setValue(getReferenceValue());
 }