commit | 60ade295dfb6c4d7cfa9f4c398aa2d4ebf36e636 | [log] [tgz] |
---|---|---|
author | ezio84 <brabus84@gmail.com> | Tue Jun 19 16:24:57 2018 +0200 |
committer | Anushek Prasal <anushekprasal@gmail.com> | Thu Feb 07 22:58:31 2019 +0530 |
tree | 5cc62983e4d839c4ddeebae692589795c8bda355 | |
parent | a92f90458db0fe8fbb544d7e50d45441fd4f2fdb [diff] |
Custom seekbar pref: allow to refresh values we need this in some cases e.g. when the menu has a "reset" option and we need to refresh the pref values and seekbar position Change-Id: If9ea4be4432a3e14a507e3dc6c168b6436490cc1
diff --git a/src/com/havoc/support/preferences/CustomSeekBarPreference.java b/src/com/havoc/support/preferences/CustomSeekBarPreference.java index c2cdb65..c805b55 100644 --- a/src/com/havoc/support/preferences/CustomSeekBarPreference.java +++ b/src/com/havoc/support/preferences/CustomSeekBarPreference.java
@@ -197,6 +197,11 @@ persistInt(newValue); } + public void refresh(int newValue) { + // this will trigger onProgressChanged and refresh everything + mSeekBar.setProgress(newValue - mMin); + } + @Override public void onStartTrackingTouch(SeekBar seekBar) { }