Builder
class Builder
| kotlin.Any | |
| ↳ | android.service.settings.preferences.SettingsPreferenceMetadata.Builder |
Builder to construct SettingsPreferenceMetadata.
Summary
| Public constructors | |
|---|---|
|
Create Builder instance. |
|
| Public methods | |
|---|---|
| SettingsPreferenceMetadata |
build()Constructs an immutable |
| SettingsPreferenceMetadata.Builder |
setAvailable(available: Boolean)Sets whether the preference is available. |
| SettingsPreferenceMetadata.Builder |
setEnabled(enabled: Boolean)Set whether the preference is enabled. |
| SettingsPreferenceMetadata.Builder |
Sets additional fields specific to this preference. |
| SettingsPreferenceMetadata.Builder |
setLaunchIntent(launchIntent: Intent?)Sets the intent to launch the host app page for this preference. |
| SettingsPreferenceMetadata.Builder |
setReadPermissions(readPermissions: MutableList<String!>)Sets the permissions required for reading this preference. |
| SettingsPreferenceMetadata.Builder |
setRestricted(restricted: Boolean)Sets whether the preference is restricted. |
| SettingsPreferenceMetadata.Builder |
setSummary(summary: String?)Sets the preference summary. |
| SettingsPreferenceMetadata.Builder |
Sets the preference title. |
| SettingsPreferenceMetadata.Builder |
setWritable(writable: Boolean)Sets whether the preference is writable. |
| SettingsPreferenceMetadata.Builder |
setWritePermissions(writePermissions: MutableList<String!>)Sets the permissions required for writing this preference. |
| SettingsPreferenceMetadata.Builder |
setWriteSensitivity(sensitivity: Int)Sets the preference write-level sensitivity. |
Public constructors
Builder
Builder(
screenKey: String,
key: String)
Create Builder instance.
| Parameters | |
|---|---|
screenKey |
String: required to be not empty |
key |
String: required to be not empty |
Public methods
build
fun build(): SettingsPreferenceMetadata
Constructs an immutable SettingsPreferenceMetadata object.
setAvailable
fun setAvailable(available: Boolean): SettingsPreferenceMetadata.Builder
Sets whether the preference is available.
setEnabled
fun setEnabled(enabled: Boolean): SettingsPreferenceMetadata.Builder
Set whether the preference is enabled.
setExtras
fun setExtras(extras: Bundle): SettingsPreferenceMetadata.Builder
Sets additional fields specific to this preference. Treat all data as optional.
setLaunchIntent
fun setLaunchIntent(launchIntent: Intent?): SettingsPreferenceMetadata.Builder
Sets the intent to launch the host app page for this preference.
setReadPermissions
fun setReadPermissions(readPermissions: MutableList<String!>): SettingsPreferenceMetadata.Builder
Sets the permissions required for reading this preference.
setRestricted
fun setRestricted(restricted: Boolean): SettingsPreferenceMetadata.Builder
Sets whether the preference is restricted.
setSummary
fun setSummary(summary: String?): SettingsPreferenceMetadata.Builder
Sets the preference summary.
setTitle
fun setTitle(title: String?): SettingsPreferenceMetadata.Builder
Sets the preference title.
setWritable
fun setWritable(writable: Boolean): SettingsPreferenceMetadata.Builder
Sets whether the preference is writable.
setWritePermissions
fun setWritePermissions(writePermissions: MutableList<String!>): SettingsPreferenceMetadata.Builder
Sets the permissions required for writing this preference.
setWriteSensitivity
fun setWriteSensitivity(sensitivity: Int): SettingsPreferenceMetadata.Builder
Sets the preference write-level sensitivity.