SeekBarPreference: make formatter an explicit property instead of using the extras bundle.

This commit is contained in:
Reece H. Dunn
2013-05-03 11:54:25 +01:00
parent b60ed6c9ae
commit 8e4b6044dc
2 changed files with 13 additions and 3 deletions
@@ -31,6 +31,7 @@ public class SeekBarPreference extends DialogPreference
private int mProgress = 0;
private int mMin = 0;
private int mMax = 100;
private String mFormatter = "%s";
public void setProgress(int progress) {
mProgress = progress + mMin;
@@ -62,6 +63,14 @@ public class SeekBarPreference extends DialogPreference
return mMax;
}
public void setFormatter(String formatter) {
mFormatter = formatter;
}
public String getFormatter() {
return mFormatter;
}
public SeekBarPreference(Context context, AttributeSet attrs, int defStyle)
{
super(context, attrs, defStyle);