Code example for SharedPreferences.Editor

Methods: putFloat

0
	} 
 
	@Override 
	public void putFloat (String key, float val) {
		edit(); 
		editor.putFloat(key, val);
	} 
 
	@Override 
	public void putString (String key, String val) {
		edit(); 
		editor.putString(key, val);
	} 
 
	@Override 
	public void put (Map<String, ?> vals) {
		edit(); 
		for (Entry<String, ?> val : vals.entrySet()) {
			if (val.getValue() instanceof Boolean) putBoolean(val.getKey(), (Boolean)val.getValue());
			if (val.getValue() instanceof Integer) putInteger(val.getKey(), (Integer)val.getValue());
			if (val.getValue() instanceof Long) putLong(val.getKey(), (Long)val.getValue());