public class ReactPreference
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
protected boolean |
mUseApply
The M use apply.
|
protected android.content.SharedPreferences |
prefs
The Prefs.
|
构造器和说明 |
---|
ReactPreference() |
限定符和类型 | 方法和说明 |
---|---|
void |
delete(java.lang.String key)
Delete.
|
static ReactPreference |
getInstance()
Gets instance.
|
int |
getInt(java.lang.String key)
Gets int.
|
java.lang.String |
getString(java.lang.String key)
Gets string.
|
void |
save(java.lang.String key,
java.lang.String value)
Save.
|
void |
saveInt(java.lang.String key,
int value)
Save int.
|
void |
setContext(android.content.Context context)
Sets context.
|
protected boolean mUseApply
protected android.content.SharedPreferences prefs
public void delete(java.lang.String key)
key
- the keypublic static ReactPreference getInstance()
public int getInt(java.lang.String key)
key
- the keypublic java.lang.String getString(java.lang.String key)
key
- the keypublic void save(java.lang.String key, java.lang.String value)
key
- the keyvalue
- the valuepublic void saveInt(java.lang.String key, int value)
key
- the keyvalue
- the valuepublic void setContext(android.content.Context context)
context
- the context