Settings
public 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 |
|
|---|---|
static final String |
OUTLINE_CLIPPING_DISABLED = "OUTLINE_CLIPPING_DISABLED" |
static final String |
PREFER_STATIC_SHADOWS = "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. |
Constants
OUTLINE_CLIPPING_DISABLED
public static final String OUTLINE_CLIPPING_DISABLED = "OUTLINE_CLIPPING_DISABLED"
PREFER_STATIC_SHADOWS
public static final String PREFER_STATIC_SHADOWS = "PREFER_STATIC_SHADOWS"
Public methods
getBoolean
public boolean getBoolean(String key)
Returns the boolean preference for the given key.
getInstance
public static Settings getInstance(Context context)
Returns the singleton Settings instance.
setBoolean
public 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.