Settings

open class Settings
kotlin.Any
   ↳ androidx.leanback.system.Settings

Provides various preferences affecting Leanback runtime behavior.

Note this class is not thread safe and its methods should only be invoked from the UI thread

Summary

Constants
static String

static String

Public methods
open Boolean

Returns the boolean preference for the given key.

open Unit
setBoolean(key: String!, value: Boolean)

Sets the boolean preference for the given key.

open static Settings!
getInstance(context: Context!)

Returns the singleton Settings instance.

Constants

OUTLINE_CLIPPING_DISABLED

static val OUTLINE_CLIPPING_DISABLED: String
Value: "OUTLINE_CLIPPING_DISABLED"

PREFER_STATIC_SHADOWS

static val PREFER_STATIC_SHADOWS: String
Value: "PREFER_STATIC_SHADOWS"

Public methods

getBoolean

open fun getBoolean(key: String!): Boolean

Returns the boolean preference for the given key.

setBoolean

open fun setBoolean(key: String!, value: Boolean): Unit

Sets the boolean preference for the given key. If an app uses this api to override a default preference, it must do so on every activity create.

getInstance

open static fun getInstance(context: Context!): Settings!

Returns the singleton Settings instance.