Buttons: Add buttons brightness and button backlight timeout options

This commit is contained in:
xyyx
2020-09-25 15:25:41 +00:00
committed by Hưng Phan
parent 33bc5e6d60
commit d3a510773e
5 changed files with 111 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ public class CustomSeekBarPreference extends Preference implements SeekBar.OnSee
private int mInterval = 1;
private int mCurrentValue;
private int mDefaultValue = -1;
private int mMax = 100;
private int mMax = 255;
private String mUnits = "";
private String mDefaultText = "";
private SeekBar mSeekBar;
@@ -51,7 +51,7 @@ public class CustomSeekBarPreference extends Preference implements SeekBar.OnSee
final TypedArray a = context.obtainStyledAttributes(
attrs, R.styleable.CustomSeekBarPreference);
mMax = attrs.getAttributeIntValue(ANDROIDNS, "max", 100);
mMax = attrs.getAttributeIntValue(ANDROIDNS, "max", 255);
mMin = attrs.getAttributeIntValue(SETTINGS_NS, "min", 0);
mDefaultValue = attrs.getAttributeIntValue(ANDROIDNS, "defaultValue", -1);
if (mDefaultValue > mMax) {