@Override public void onStopTrackingTouch(SeekBar seekBar) { SeekBarEx seekBarEx = (SeekBarEx) seekBar; Attribute attribute = (Attribute) seekBar.getTag(); if (attribute != null) { attribute.setValue(seekBarEx.getValue()); } }
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; }
/* * (non-Javadoc) * * @see com.dsatab.data.Value#reset() */ @Override public void reset() { setValue(getReferenceValue()); }