# Settings

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1  
Summary:[Constants](https://developer.android.com/reference/android/support/v17/leanback/system/Settings#constants)\|[Methods](https://developer.android.com/reference/android/support/v17/leanback/system/Settings#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v17/leanback/system/Settings#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v17/leanback/system/Settings#)  

# Settings

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


class
Settings
`  
`

extends Object


``


`

|---|----------------------------------------------|
| java.lang.Object                                ||
| ↳ | android.support.v17.leanback.system.Settings |

<br />

*** ** * ** ***

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

<br />

## Summary

|                                                                        ### Constants                                                                         ||
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------|
| `String` | [OUTLINE_CLIPPING_DISABLED](https://developer.android.com/reference/android/support/v17/leanback/system/Settings#OUTLINE_CLIPPING_DISABLED) <br /> |
| `String` | [PREFER_STATIC_SHADOWS](https://developer.android.com/reference/android/support/v17/leanback/system/Settings#PREFER_STATIC_SHADOWS) <br />         |

|                                                                                                                                                                                       ### Public methods                                                                                                                                                                                       ||
|------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` boolean`                                                                                                 | ` `[getBoolean](https://developer.android.com/reference/android/support/v17/leanback/system/Settings#getBoolean(java.lang.String))`(String key) ` Returns the boolean preference for the given key.                                                                                |
| ` static `[Settings](https://developer.android.com/reference/android/support/v17/leanback/system/Settings) | ` `[getInstance](https://developer.android.com/reference/android/support/v17/leanback/system/Settings#getInstance(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context) ` Returns the singleton Settings instance. |
| ` void`                                                                                                    | ` `[setBoolean](https://developer.android.com/reference/android/support/v17/leanback/system/Settings#setBoolean(java.lang.String, boolean))`(String key, boolean value) ` Sets the boolean preference for the given key.                                                           |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/system/Settings#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Constants

### OUTLINE_CLIPPING_DISABLED

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String OUTLINE_CLIPPING_DISABLED
```

<br />

<br />

Constant Value: "OUTLINE_CLIPPING_DISABLED"  

### PREFER_STATIC_SHADOWS

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String PREFER_STATIC_SHADOWS
```

<br />

<br />

Constant Value: "PREFER_STATIC_SHADOWS"

## Public methods

### getBoolean

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean getBoolean (String key)
```

Returns the boolean preference for the given key.

<br />

|       Parameters       ||
|-------|-----------------|
| `key` | `String` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### getInstance

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Settings getInstance (Context context)
```

Returns the singleton Settings instance.

<br />

|         Parameters          ||
|-----------|------------------|
| `context` | `Context` <br /> |

|                                                 Returns                                                  ||
|--------------------------------------------------------------------------------------------------|--------|
| [Settings](https://developer.android.com/reference/android/support/v17/leanback/system/Settings) | <br /> |

### setBoolean

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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.

<br />

|        Parameters         ||
|---------|------------------|
| `key`   | `String` <br />  |
| `value` | `boolean` <br /> |

-

  ## Classes

  - [Settings](https://developer.android.com/reference/android/support/v17/leanback/system/Settings)