SettingsPreferenceValue
class SettingsPreferenceValue : Parcelable
| kotlin.Any | |
| ↳ | android.service.settings.preferences.SettingsPreferenceValue |
This objects represents a value that can be used for a particular settings preference.
The data type for the value will correspond to getType. For possible types, see constants below, such as TYPE_BOOLEAN and TYPE_STRING. Depending on the type, the corresponding getter will contain its value.
See documentation on the constants for which getter method should be used.
Summary
| Nested classes | |
|---|---|
|
Builder to construct |
|
| Constants | |
|---|---|
| static Int |
Value is of type boolean. |
| static Int |
Value is of type double. |
| static Int |
Value is of type int. |
| static Int |
Value is of type long. |
| static Int |
Value is of type string. |
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Boolean |
Returns the boolean value for Preference, the type must be |
| Double |
Returns the double value for Preference, the type must be |
| Int |
Returns the int value for Preference, the type must be |
| Long |
Returns the long value for Preference, the type must be |
| String? |
Returns the string value for Preference, the type must be |
| Int |
getType()Returns the type indicator for Preference value. |
| Properties | |
|---|---|
| static Parcelable.Creator<SettingsPreferenceValue!> |
Parcelable Creator for |
Constants
TYPE_BOOLEAN
static val TYPE_BOOLEAN: Int
Value is of type boolean. Access via getBooleanValue.
Value: 0TYPE_DOUBLE
static val TYPE_DOUBLE: Int
Value is of type double. Access via getDoubleValue().
Value: 2TYPE_INT
static val TYPE_INT: Int
Value is of type int. Access via getIntValue.
Value: 4TYPE_LONG
static val TYPE_LONG: Int
Value is of type long. Access via getLongValue().
Value: 1TYPE_STRING
static val TYPE_STRING: Int
Value is of type string. Access via getStringValue.
Value: 3Public methods
getBooleanValue
fun getBooleanValue(): Boolean
Returns the boolean value for Preference, the type must be TYPE_BOOLEAN.
getDoubleValue
fun getDoubleValue(): Double
Returns the double value for Preference, the type must be TYPE_DOUBLE.
getIntValue
fun getIntValue(): Int
Returns the int value for Preference, the type must be TYPE_INT.
getLongValue
fun getLongValue(): Long
Returns the long value for Preference, the type must be TYPE_LONG.
getStringValue
fun getStringValue(): String?
Returns the string value for Preference, the type must be TYPE_STRING.
getType
fun getType(): Int
Returns the type indicator for Preference value.
Properties
CREATOR
static val CREATOR: Parcelable.Creator<SettingsPreferenceValue!>
Parcelable Creator for SettingsPreferenceValue.