library / org.akop.kotx.ext.content / android.content.SharedPreferences.Editor

Extensions for android.content.SharedPreferences.Editor

put

fun Editor.put(key: String, value: String?): Unit

Write a nullable String value in the preferences editor, to be written back once {@link SharedPreferences.Editor#commit} or {@link SharedPreferences.Editor#apply} are called.

fun Editor.put(key: String, value: Set<String?>?): Unit

Write a nullable set of Strings in the preferences editor, to be written back once {@link SharedPreferences.Editor#commit} or {@link SharedPreferences.Editor#apply} are called.

fun Editor.put(key: String, value: Int): Unit

Write an integer value in the preferences editor, to be written back once {@link SharedPreferences.Editor#commit} or {@link SharedPreferences.Editor#apply} are called.

fun Editor.put(key: String, value: Float): Unit

Write a float value in the preferences editor, to be written back once {@link SharedPreferences.Editor#commit} or {@link SharedPreferences.Editor#apply} are called.

fun Editor.put(key: String, value: Long): Unit

Write a long value in the preferences editor, to be written back once {@link SharedPreferences.Editor#commit} or {@link SharedPreferences.Editor#apply} are called.

fun Editor.put(key: String, value: Boolean): Unit

Write a boolean value in the preferences editor, to be written back once {@link SharedPreferences.Editor#commit} or {@link SharedPreferences.Editor#apply} are called.