public Item(@NonNull Preference preference, @NonNull Setter setter, @NonNull CfgBase cfg) { this.preference = preference; this.setter = setter; this.cfg = cfg; this.option = cfg.getOption(preference.getKey()); }
/** * Stops to listen to the changes. * * @see #start() */ public void stop() { mStarted = false; mCfg.unregisterListener(mConfigListener); for (Item item : mItems) item.preference.setOnPreferenceChangeListener(null); }