Add deadzone preference

This commit is contained in:
Cameron Gutman
2014-11-13 23:22:13 -08:00
parent 1b9846d519
commit 6338e7b8eb
6 changed files with 26 additions and 51 deletions

View File

@@ -48,7 +48,7 @@ public class SeekBarPreference extends DialogPreference
}
// Get default and max seekbar values
defaultValue = PreferenceConfiguration.getDefaultBitrate(context);
defaultValue = attrs.getAttributeIntValue(SCHEMA_URL, "defaultValue", PreferenceConfiguration.getDefaultBitrate(context));
maxValue = attrs.getAttributeIntValue(SCHEMA_URL, "max", 100);
}
@@ -80,7 +80,7 @@ public class SeekBarPreference extends DialogPreference
@Override
public void onProgressChanged(SeekBar seekBar, int value, boolean b) {
String t = String.valueOf(value);
valueText.setText(suffix == null ? t : t.concat(" " + suffix));
valueText.setText(suffix == null ? t : t.concat(suffix.length() > 1 ? " "+suffix : suffix));
}
@Override