SharedPreferencesView

Read-only wrapper around SharedPreferences. This will be passed in to your migration.

Functions

Link copied to clipboard
operator fun contains(key: String): Boolean

Checks whether the preferences contains a preference.

Link copied to clipboard
fun getAll(): Map<String, Any?>

Retrieve all values from the preferences that are in the specified keySet.

Link copied to clipboard
fun getBoolean(key: String, defValue: Boolean): Boolean

Retrieves a boolean value from the preferences.

Link copied to clipboard
fun getFloat(key: String, defValue: Float): Float

Retrieves a float value from the preferences.

Link copied to clipboard
fun getInt(key: String, defValue: Int): Int

Retrieves a int value from the preferences.

Link copied to clipboard
fun getLong(key: String, defValue: Long): Long

Retrieves a long value from the preferences.

Link copied to clipboard
fun getString(key: String, defValue: String? = null): String?

Retrieves a string value from the preferences.

Link copied to clipboard
fun getStringSet(key: String, defValues: Set<String>? = null): Set<String>?

Retrieves a string set value from the preferences.