mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
SharedPrefUtilsメソッド追加
This commit is contained in:
parent
af626f4dc0
commit
ec7adbe331
|
@ -26,4 +26,14 @@ public class SharedPrefUtilsImpl implements SharedPrefUtils{
|
||||||
// Editorの取得
|
// Editorの取得
|
||||||
return applicationContext.getSharedPreferences(name, Context.MODE_PRIVATE).edit();
|
return applicationContext.getSharedPreferences(name, Context.MODE_PRIVATE).edit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SharedPreferences getSharedPreferences(String name) {
|
||||||
|
return applicationContext.getSharedPreferences(name, Context.MODE_PRIVATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SharedPreferences getSharedPreferences() {
|
||||||
|
return applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE); // TODO-rca: 決め打ちやめる?
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,4 +10,8 @@ public interface SharedPrefUtils {
|
||||||
// TODO-rca: 名称をenumで管理する?
|
// TODO-rca: 名称をenumで管理する?
|
||||||
SharedPreferences.Editor getEditor(String name);
|
SharedPreferences.Editor getEditor(String name);
|
||||||
|
|
||||||
|
SharedPreferences getSharedPreferences(String name);
|
||||||
|
|
||||||
|
SharedPreferences getSharedPreferences();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user