added in version 24.1.0
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1

Settings

public class Settings
extends Object

java.lang.Object
   ↳ android.support.v17.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

String OUTLINE_CLIPPING_DISABLED

String PREFER_STATIC_SHADOWS

Public methods

boolean getBoolean(String key)

Returns the boolean preference for the given key.

static Settings getInstance(Context context)

Returns the singleton Settings instance.

void setBoolean(String key, boolean value)

Sets the boolean preference for the given key.

Inherited methods

From class java.lang.Object

Constants

OUTLINE_CLIPPING_DISABLED

added in version 27.1.0
String OUTLINE_CLIPPING_DISABLED

Constant Value: "OUTLINE_CLIPPING_DISABLED"

PREFER_STATIC_SHADOWS

added in version 24.1.0
String PREFER_STATIC_SHADOWS

Constant Value: "PREFER_STATIC_SHADOWS"

Public methods

getBoolean

added in version 24.1.0
boolean getBoolean (String key)

Returns the boolean preference for the given key.

Parameters
key String

Returns
boolean

getInstance

added in version 24.1.0
Settings getInstance (Context context)

Returns the singleton Settings instance.

Parameters
context Context

Returns
Settings

setBoolean

added in version 24.1.0
void setBoolean (String key, 
                boolean value)

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.

Parameters
key String

value boolean