Closed maoruibin closed 3 years ago
在我使用 SwitchPreference 结合 SwitchButton 做设置页面时,会出现奇怪的 UI 问题,每次更新 其他 Item 时。SwitchPreference 上的SwitchButton 会自动执行动画一次, 不知道,你有没有让 这个控件 跟 SwitchPreference 结合使用过,其实你可以在 demo 中 加入 设置页面中使用 SwitchButton 的示例,毕竟 这个控件跟 设置界面结合使用 比较多!
https://github.com/jenzz/Android-MaterialPreference
I have also met this question, use like this mSwitchButton.setCheckedImmediately(isChecked);
mSwitchButton.setCheckedImmediately(isChecked);
在我使用 SwitchPreference 结合 SwitchButton 做设置页面时,会出现奇怪的 UI 问题,每次更新 其他 Item 时。SwitchPreference 上的SwitchButton 会自动执行动画一次, 不知道,你有没有让 这个控件 跟 SwitchPreference 结合使用过,其实你可以在 demo 中 加入 设置页面中使用 SwitchButton 的示例,毕竟 这个控件跟 设置界面结合使用 比较多!
https://github.com/jenzz/Android-MaterialPreference