KotprefModel

abstract class KotprefModel(contextProvider: ContextProvider, preferencesProvider: PreferencesProvider)

Constructors

KotprefModel
Link copied to clipboard
fun KotprefModel(context: Context, preferencesProvider: PreferencesProvider = defaultPreferenceProvider())

Functions

beginBulkEdit
Link copied to clipboard
fun beginBulkEdit()
Begin bulk edit mode.
blockingCommitBulkEdit
Link copied to clipboard
fun blockingCommitBulkEdit()
Commit values set in the bulk edit mode to preferences immediately, in blocking manner.
cancelBulkEdit
Link copied to clipboard
fun cancelBulkEdit()
Cancel bulk edit mode.
clear
Link copied to clipboard
open fun clear()
Clear all preferences in this model
commitBulkEdit
Link copied to clipboard
fun commitBulkEdit()
Commit values set in the bulk edit mode to preferences.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getPrefKey
Link copied to clipboard
fun getPrefKey(property: KProperty<*>): String?
Get preference key for a property.
hashCode
Link copied to clipboard
open fun hashCode(): Int
remove
Link copied to clipboard
fun remove(property: KProperty<*>)
Remove entry from SharedPreferences
toString
Link copied to clipboard
open fun toString(): String

Properties

commitAllPropertiesByDefault
Link copied to clipboard
open val commitAllPropertiesByDefault: Boolean = false
commit() all properties in this pref by default instead of apply()
context
Link copied to clipboard
val context: Context
Application Context
kotprefMode
Link copied to clipboard
open val kotprefMode: Int
Preference read/write mode
kotprefName
Link copied to clipboard
open val kotprefName: String
Preference file name
preferences
Link copied to clipboard
val preferences: SharedPreferences
SharedPreferences instance exposed.

Sources

(source)
Link copied to clipboard