diff options
Diffstat (limited to 'packages/SystemUI/src/com')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java b/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java index acfeb4f..35b574b 100644 --- a/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java +++ b/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java @@ -79,8 +79,9 @@ public class ToggleSlider extends RelativeLayout { public void setMirror(ToggleSlider toggleSlider) { mMirror = toggleSlider; if (mMirror != null) { - mMirror.mToggle.setChecked(mToggle.isChecked()); - mMirror.mSlider.setProgress(mSlider.getProgress()); + mMirror.setChecked(mToggle.isChecked()); + mMirror.setMax(mSlider.getMax()); + mMirror.setValue(mSlider.getProgress()); } } @@ -110,10 +111,16 @@ public class ToggleSlider extends RelativeLayout { public void setMax(int max) { mSlider.setMax(max); + if (mMirror != null) { + mMirror.setMax(max); + } } public void setValue(int value) { mSlider.setProgress(value); + if (mMirror != null) { + mMirror.setValue(value); + } } private final OnCheckedChangeListener mCheckListener = new OnCheckedChangeListener() { @@ -141,7 +148,7 @@ public class ToggleSlider extends RelativeLayout { } if (mMirror != null) { - mMirror.mSlider.setProgress(progress); + mMirror.setValue(progress); } } |