Loading core/java/android/widget/Switch.java +3 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,9 @@ public class Switch extends CompoundButton { // Refresh display with current params refreshDrawableState(); // Default state is derived from on/off-text, so state has to be updated when on/off-text // are updated. setDefaultStateDescritption(); setChecked(isChecked()); } Loading core/java/android/widget/ToggleButton.java +3 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,9 @@ public class ToggleButton extends CompoundButton { mTextOff = a.getText(com.android.internal.R.styleable.ToggleButton_textOff); mDisabledAlpha = a.getFloat(com.android.internal.R.styleable.ToggleButton_disabledAlpha, 0.5f); syncTextState(); // Default state is derived from on/off-text, so state has to be updated when on/off-text // are updated. setDefaultStateDescritption(); a.recycle(); } Loading Loading
core/java/android/widget/Switch.java +3 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,9 @@ public class Switch extends CompoundButton { // Refresh display with current params refreshDrawableState(); // Default state is derived from on/off-text, so state has to be updated when on/off-text // are updated. setDefaultStateDescritption(); setChecked(isChecked()); } Loading
core/java/android/widget/ToggleButton.java +3 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,9 @@ public class ToggleButton extends CompoundButton { mTextOff = a.getText(com.android.internal.R.styleable.ToggleButton_textOff); mDisabledAlpha = a.getFloat(com.android.internal.R.styleable.ToggleButton_disabledAlpha, 0.5f); syncTextState(); // Default state is derived from on/off-text, so state has to be updated when on/off-text // are updated. setDefaultStateDescritption(); a.recycle(); } Loading