-
Notifications
You must be signed in to change notification settings - Fork 5
SharedPreferencesExtensions
Birju Vachhani edited this page Sep 26, 2019
·
2 revisions
Note that these SharedPreferences extensions only supports primitive types.
// write async
pref.write(KEY,"text")
pref.write(KEY,15)
pref.write(KEY,30L)
pref.write(KEY,2.5F)
pref.write(KEY,true) pref.writeSync(KEY,VALUE) // set async
pref[KEY] = "text"
pref[KEY] = 15
pref[KEY] = 2.8F
pref[KEY] = 38L
pref[KEY] = true pref.clear() pref.remove(KEY)For more information, look at the SharedPreferencesExtensions.kt file.
Here are the available Class Extensions: