红包需求
This commit is contained in:
@@ -3,6 +3,8 @@ package com.yizhuan.xchat_android_library.utils.pref;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
||||
|
||||
/**
|
||||
* Creator: 舒强睿
|
||||
* Date:2015/1/12
|
||||
@@ -30,6 +32,14 @@ public class SettingsPref extends YSharedPref {
|
||||
return instanse;
|
||||
}
|
||||
|
||||
public synchronized static SettingsPref instance() {
|
||||
if(instanse == null){
|
||||
SharedPreferences pref = BasicConfig.INSTANCE.getAppContext().getSharedPreferences("SettingsPrefs", Context.MODE_PRIVATE);
|
||||
instanse = new SettingsPref(pref);
|
||||
}
|
||||
return instanse;
|
||||
}
|
||||
|
||||
public String getString(String key, String defaultValue) {
|
||||
return get(key) == null ? defaultValue : get(key);
|
||||
}
|
||||
|
Reference in New Issue
Block a user