mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2025-04-15 04:30:49 +00:00
SharedPrefUtilsメソッド追加
This commit is contained in:
parent
af626f4dc0
commit
ec7adbe331
@ -26,4 +26,14 @@ public class SharedPrefUtilsImpl implements SharedPrefUtils{
|
||||
// Editorの取得
|
||||
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で管理する?
|
||||
SharedPreferences.Editor getEditor(String name);
|
||||
|
||||
SharedPreferences getSharedPreferences(String name);
|
||||
|
||||
SharedPreferences getSharedPreferences();
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user