Settings


class 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

const String!
OUTLINE_CLIPPING_DISABLED = "OUTLINE_CLIPPING_DISABLED"
const String!
PREFER_STATIC_SHADOWS = "PREFER_STATIC_SHADOWS"

Public functions

Boolean

Returns the boolean preference for the given key.

java-static Settings!
getInstance(context: Context!)

Returns the singleton Settings instance.

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

Sets the boolean preference for the given key.

Constants

OUTLINE_CLIPPING_DISABLED

Added in 1.1.0
const val OUTLINE_CLIPPING_DISABLED = "OUTLINE_CLIPPING_DISABLED": String!

PREFER_STATIC_SHADOWS

Added in 1.1.0
const val PREFER_STATIC_SHADOWS = "PREFER_STATIC_SHADOWS": String!

Public functions

getBoolean

Added in 1.1.0
fun getBoolean(key: String!): Boolean

Returns the boolean preference for the given key.

getInstance

Added in 1.1.0
java-static fun getInstance(context: Context!): Settings!

Returns the singleton Settings instance.

setBoolean

Added in 1.1.0
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.