Code example for ListPreference

Methods: setSummary, setValue, setValueIndex

0
			}); 
    	} 
 
    	private void updateValueFromConfig() { 
    		// Set the preference to a default value, unless the config is set. 
    		preference.setValue("");
    		preference.setSummary(summary);
			if (configField.isSet()) {
  				T v = configField.get();
  				if (configField.hasValidValuesLoaded()) {
  	  				int ndx = configField.indexOf(v);
  	  				if (ndx >= 0) {
  	  					preference.setValueIndex(ndx);
  	  					List<T> vv = configField.getValidValues();
  	  					preference.setSummary(vv.get(ndx).getItemLabel());
  	  				} 
  				} 
  			} 
			if (next != null) {
				next.loadChoices();
			}