안드로이드 저장 방식 중 하나
val pref = getSharedPreferences("data", MODE_PRIVATE)
val editor = pref.edit()
editor.putBoolean("data1", true)
editor.putFloat("data2", 11.11f)
editor.putInt("data3", 100)
editor.putLong("data4", 100L)
editor.putString("data5", "문자열")
val set1 = mutableSetOf<String>()
set1.add("문자열1")
set1.add("문자열2")
set1.add("문자열3")
editor.putStringSet("data6", set1)
editor.commit()
val pref = getSharedPreferences("data", MODE_PRIVATE)
val data1 = pref.getBoolean("data1", false)
val data2 = pref.getFloat("data2", 0.0f)
val data3 = pref.getInt("data3", 0)
val data4 = pref.getLong("data4", 0L)
val data5 = pref.getString("data5", null)
val data6 = pref.getStringSet("data6", null)