public SeekBarPreference createSeekBarPreference( OsmandPreference<Integer> b, int title, int summary, int dialogTextId, int defValue, int maxValue) { SeekBarPreference p = new SeekBarPreference(this, dialogTextId, defValue, maxValue); p.setTitle(title); p.setKey(b.getId()); p.setSummary(summary); p.setOnPreferenceChangeListener(this); screenPreferences.put(b.getId(), p); seekBarPreferences.put(b.getId(), b); return p; }
public void registerSeekBarPreference(OsmandPreference<Integer> b, PreferenceScreen screen) { SeekBarPreference p = (SeekBarPreference) screen.findPreference(b.getId()); p.setOnPreferenceChangeListener(this); screenPreferences.put(b.getId(), p); seekBarPreferences.put(b.getId(), b); }