Code example for Preference.OnPreferenceChangeListener

Methods: onPreferenceChange

0
        return true; 
      } 
    }); 
    updatePreferenceSummary(preference, options, values, summaryId, value);
    if (listener != null) {
      listener.onPreferenceChange(preference, value);
    } 
  } 
 
  /** 
   * Updates a preference when a stored value changes. 
   *  
   * @param preference the preference 
   * @param options the list of displayed options 
   * @param values the list of stored values 
   * @param summaryId the summary id 
   * @param value the stored value 
   */ 
  private void updatePreferenceSummary( 
      Preference preference, String[] options, String[] values, int summaryId, String value) {
    String summary = getString(summaryId);