public final class LongPreference extends SharedPreference<Long>
BooleanPreference,
IntegerPreference,
FloatPreference,
StringPreference,
EnumPreferenceSharedPreference.PreferenceChangeCallback<P>| Constructor and Description |
|---|
LongPreference(int keyResId,
Long defValue)
Deprecated.
Use
LongPreference(String, Long) instead. |
LongPreference(String key,
Long defValue)
Creates a new instance of LongPreference with the specified key and defValue.
|
| Modifier and Type | Method and Description |
|---|---|
protected Long |
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 LongPreference(String key, Long defValue)
@Deprecated public LongPreference(int keyResId, Long defValue)
LongPreference(String, Long) instead.Creates a new instance of LongPreference.
protected boolean onPutIntoPreferences(android.content.SharedPreferences preferences)
SharedPreferenceonPutIntoPreferences in class SharedPreference<Long>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 Long onGetFromPreferences(android.content.SharedPreferences preferences)
SharedPreferenceonGetFromPreferences in class SharedPreference<Long>preferences - The instance of shared preferences into which was the value of this preference
before saved.