public final class FloatPreference extends SharedPreference<Float>
BooleanPreference,
IntegerPreference,
LongPreference,
StringPreference,
EnumPreferenceSharedPreference.PreferenceChangeCallback<P>| Constructor and Description |
|---|
FloatPreference(int keyResId,
Float defValue)
Deprecated.
Use
FloatPreference(String, Float) instead. |
FloatPreference(String key,
Float defValue)
Creates a new instance of FloatPreference with the specified key and defValue.
|
| Modifier and Type | Method and Description |
|---|---|
protected Float |
onGetFromPreferences(android.content.SharedPreferences preferences)
Invoked to retrieve the actual value of this preference from the given shared preferences.
|
protected boolean |
onPutIntoPreferences(android.content.SharedPreferences preferences)
Invoked to persist the actual value into the given shared preferences.
|
attachKey, createOnChangeListener, getDefaultValue, getKey, getKeyRes, getValue, putIntoPreferences, retrieve, save, updateValuepublic FloatPreference(String key, Float defValue)
@Deprecated public FloatPreference(int keyResId, Float defValue)
FloatPreference(String, Float) instead.Creates a new instance of FloatPreference.
protected boolean onPutIntoPreferences(android.content.SharedPreferences preferences)
SharedPreferenceonPutIntoPreferences in class SharedPreference<Float>preferences - The instance of shared preferences into which should be the current value
of this preference persisted.True if put has been successful, false otherwise.protected Float onGetFromPreferences(android.content.SharedPreferences preferences)
SharedPreferenceonGetFromPreferences in class SharedPreference<Float>preferences - The instance of shared preferences into which was the value of this preference
before saved.