Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/content/res/Configuration#constants) \| [Inherited Constants](https://developer.android.com/reference/android/content/res/Configuration#inhconstants) \| [Fields](https://developer.android.com/reference/android/content/res/Configuration#lfields) \| [Ctors](https://developer.android.com/reference/android/content/res/Configuration#pubctors) \| [Methods](https://developer.android.com/reference/android/content/res/Configuration#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/content/res/Configuration#inhmethods)

# Configuration

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/content/res/Configuration "View this page in Kotlin") \|Java


`
public

final

class
Configuration
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/java/lang/Comparable<https://developer.android.com/reference/android/content/res/Configuration>,

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.content.res.Configuration |

<br />

*** ** * ** ***

This class describes all device configuration information that can
impact the resources the application retrieves. This includes both
user-specified configuration options (locale list and scaling) as well
as device configurations (such as input modes, screen size and screen orientation).

You can acquire this object from `https://developer.android.com/reference/android/content/res/Resources`, using `https://developer.android.com/reference/android/content/res/Resources#getConfiguration()`. Thus, from an activity, you can get it by chaining the request
with `https://developer.android.com/reference/android/view/ContextThemeWrapper#getResources()`:

```
Configuration config = getResources().getConfiguration();
```

<br />

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_MASK` Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: bits that encode the dynamic range of the screen. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_NO` Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_MASK` value indicating that the screen is not HDR (low/standard dynamic range). |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_SHIFT` Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: bits shift to get the screen dynamic range. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_MASK` value indicating that it is unknown whether or not the screen is HDR. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_YES` Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_MASK` value indicating that the screen is HDR (dynamic range). |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a value indicating that the color mode is undefined |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_MASK` Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: bits that encode whether the screen is wide gamut. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_NO` Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_MASK` value indicating that the screen is not wide gamut. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_MASK` value indicating that it is unknown whether or not the screen is wide gamut. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_YES` Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_MASK` value indicating that the screen is wide gamut. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#DENSITY_DPI_UNDEFINED` Default value for `https://developer.android.com/reference/android/content/res/Configuration#densityDpi` indicating that no width has been specified. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#FONT_WEIGHT_ADJUSTMENT_UNDEFINED` An undefined fontWeightAdjustment. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_FEMININE` Constant for grammatical gender: to indicate the terms of address the user preferred in an application is feminine. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_MASCULINE` Constant for grammatical gender: to indicate the terms of address the user preferred in an application is masculine. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_NEUTRAL` Constant for grammatical gender: to indicate the terms of address the user preferred in an application is neuter. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_NOT_SPECIFIED` Constant for grammatical gender: to indicate the user has not specified the terms of address for the application. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#HARDKEYBOARDHIDDEN_NO` Constant for `https://developer.android.com/reference/android/content/res/Configuration#hardKeyboardHidden`, value corresponding to the physical keyboard being exposed. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#HARDKEYBOARDHIDDEN_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#hardKeyboardHidden`: a value indicating that no value has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#HARDKEYBOARDHIDDEN_YES` Constant for `https://developer.android.com/reference/android/content/res/Configuration#hardKeyboardHidden`, value corresponding to the physical keyboard being hidden. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#KEYBOARDHIDDEN_NO` Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboardHidden`, value corresponding to the [keysexposed](https://developer.android.com/guide/topics/resources/providing-resources#KeyboardAvailQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#KEYBOARDHIDDEN_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboardHidden`: a value indicating that no value has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#KEYBOARDHIDDEN_YES` Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboardHidden`, value corresponding to the [keyshidden](https://developer.android.com/guide/topics/resources/providing-resources#KeyboardAvailQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#KEYBOARD_12KEY` Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboard`, value corresponding to the [12key](https://developer.android.com/guide/topics/resources/providing-resources#ImeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#KEYBOARD_NOKEYS` Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboard`, value corresponding to the [nokeys](https://developer.android.com/guide/topics/resources/providing-resources#ImeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#KEYBOARD_QWERTY` Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboard`, value corresponding to the [qwerty](https://developer.android.com/guide/topics/resources/providing-resources#ImeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#KEYBOARD_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboard`: a value indicating that no value has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#MNC_ZERO` Constant used to to represent MNC (Mobile Network Code) zero. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATIONHIDDEN_NO` Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigationHidden`, value corresponding to the [navexposed](https://developer.android.com/guide/topics/resources/providing-resources#NavAvailQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATIONHIDDEN_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigationHidden`: a value indicating that no value has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATIONHIDDEN_YES` Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigationHidden`, value corresponding to the [navhidden](https://developer.android.com/guide/topics/resources/providing-resources#NavAvailQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATION_DPAD` Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigation`, value corresponding to the [dpad](https://developer.android.com/guide/topics/resources/providing-resources#NavigationQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATION_NONAV` Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigation`, value corresponding to the [nonav](https://developer.android.com/guide/topics/resources/providing-resources#NavigationQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATION_TRACKBALL` Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigation`, value corresponding to the [trackball](https://developer.android.com/guide/topics/resources/providing-resources#NavigationQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATION_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigation`: a value indicating that no value has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATION_WHEEL` Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigation`, value corresponding to the [wheel](https://developer.android.com/guide/topics/resources/providing-resources#NavigationQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#ORIENTATION_LANDSCAPE` Constant for `https://developer.android.com/reference/android/content/res/Configuration#orientation`, value corresponding to the [land](https://developer.android.com/guide/topics/resources/providing-resources#OrientationQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#ORIENTATION_PORTRAIT` Constant for `https://developer.android.com/reference/android/content/res/Configuration#orientation`, value corresponding to the [port](https://developer.android.com/guide/topics/resources/providing-resources#OrientationQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#ORIENTATION_SQUARE` *This constant was deprecated in API level 16. Not currently supported or used.* |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#ORIENTATION_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#orientation`: a value indicating that no value has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_LTR` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_MASK` value indicating that a layout dir has been set to LTR. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_MASK` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: bits that encode the layout direction. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_RTL` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_MASK` value indicating that a layout dir has been set to RTL. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_SHIFT` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: bits shift to get the layout direction. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_MASK` value indicating that no layout dir has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_MASK` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: bits that encode the aspect ratio. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_NO` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_MASK` value that corresponds to the [notlong](https://developer.android.com/guide/topics/resources/providing-resources#ScreenAspectQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_MASK` value indicating that no size has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_YES` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_MASK` value that corresponds to the [long](https://developer.android.com/guide/topics/resources/providing-resources#ScreenAspectQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_MASK` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: bits that encode roundness of the screen. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_NO` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_MASK` value indicating that the screen does not have a rounded shape. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_MASK` value indicating that it is unknown whether or not the screen has a round shape. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_YES` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_MASK` value indicating that the screen has a rounded shape. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_LARGE` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK` value indicating the screen is at least approximately 480x640 dp units, corresponds to the [large](https://developer.android.com/guide/topics/resources/providing-resources#ScreenSizeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: bits that encode the size. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_NORMAL` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK` value indicating the screen is at least approximately 320x470 dp units, corresponds to the [normal](https://developer.android.com/guide/topics/resources/providing-resources#ScreenSizeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_SMALL` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK` value indicating the screen is at least approximately 320x426 dp units, corresponds to the [small](https://developer.android.com/guide/topics/resources/providing-resources#ScreenSizeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK` value indicating that no size has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_XLARGE` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK` value indicating the screen is at least approximately 720x960 dp units, corresponds to the [xlarge](https://developer.android.com/guide/topics/resources/providing-resources#ScreenSizeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a value indicating that screenLayout is undefined |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREEN_HEIGHT_DP_UNDEFINED` Default value for `https://developer.android.com/reference/android/content/res/Configuration#screenHeightDp` indicating that no width has been specified. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SCREEN_WIDTH_DP_UNDEFINED` Default value for `https://developer.android.com/reference/android/content/res/Configuration#screenWidthDp` indicating that no width has been specified. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#SMALLEST_SCREEN_WIDTH_DP_UNDEFINED` Default value for `https://developer.android.com/reference/android/content/res/Configuration#smallestScreenWidthDp` indicating that no width has been specified. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#TOUCHSCREEN_FINGER` Constant for `https://developer.android.com/reference/android/content/res/Configuration#touchscreen`, value corresponding to the [finger](https://developer.android.com/guide/topics/resources/providing-resources#TouchscreenQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#TOUCHSCREEN_NOTOUCH` Constant for `https://developer.android.com/reference/android/content/res/Configuration#touchscreen`, value corresponding to the [notouch](https://developer.android.com/guide/topics/resources/providing-resources#TouchscreenQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#TOUCHSCREEN_STYLUS` *This constant was deprecated in API level 16. Not currently supported or used.* |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#TOUCHSCREEN_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#touchscreen`: a value indicating that no value has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_MASK` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: bits that encode the night mode. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_NO` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_MASK` value that corresponds to the [notnight](https://developer.android.com/guide/topics/resources/providing-resources#NightQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_MASK` value indicating that no mode type has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_YES` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_MASK` value that corresponds to the [night](https://developer.android.com/guide/topics/resources/providing-resources#NightQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_APPLIANCE` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK` value that corresponds to the [appliance](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_CAR` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK` value that corresponds to the [car](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_DESK` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK` value that corresponds to the [desk](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: bits that encode the mode type. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_NORMAL` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK` value that corresponds to [no UI mode](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier) resource qualifier specified. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_TELEVISION` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK` value that corresponds to the [television](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_UNDEFINED` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK` value indicating that no mode type has been set. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_VR_HEADSET` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK` value that corresponds to the [vrheadset](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier) resource qualifier. |
| `int` | `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_WATCH` Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK` value that corresponds to the [watch](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier) resource qualifier. |

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/android/os/Parcelable` |---|---| | `int` | `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor. | | `int` | `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/content/res/Configuration>` | `https://developer.android.com/reference/android/content/res/Configuration#CREATOR` |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#colorMode` Bit mask of color capabilities of the screen. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#densityDpi` The target screen density being rendered to, corresponding to [density](https://developer.android.com/guide/topics/resources/providing-resources#DensityQualifier) resource qualifier. |
| ` public float` | `https://developer.android.com/reference/android/content/res/Configuration#fontScale` Current user preference for the scaling factor for fonts, relative to the base density scaling. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#fontWeightAdjustment` Adjustment in text font weight. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#hardKeyboardHidden` A flag indicating whether the hard keyboard has been hidden. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#keyboard` The kind of keyboard attached to the device. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#keyboardHidden` A flag indicating whether any keyboard is available. |
| ` public https://developer.android.com/reference/java/util/Locale` | `https://developer.android.com/reference/android/content/res/Configuration#locale` *This field was deprecated in API level 24. Do not set or read this directly. Use `https://developer.android.com/reference/android/content/res/Configuration#getLocales()` and `https://developer.android.com/reference/android/content/res/Configuration#setLocales(android.os.LocaleList)`. If only the primary locale is needed, `getLocales().get(0)` is now the preferred accessor.* |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#mcc` IMSI MCC (Mobile Country Code), corresponding to [mcc](https://developer.android.com/guide/topics/resources/providing-resources#MccQualifier) resource qualifier. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#mnc` IMSI MNC (Mobile Network Code), corresponding to [mnc](https://developer.android.com/guide/topics/resources/providing-resources#MccQualifier) resource qualifier. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#navigation` The kind of navigation method available on the device. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#navigationHidden` A flag indicating whether any 5-way or DPAD navigation available. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#orientation` Overall orientation of the screen. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#screenHeightDp` The height of the available screen space in dp units. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#screenLayout` Bit mask of overall layout of the screen. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#screenWidthDp` The width of the available screen space in dp units. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#smallestScreenWidthDp` The smallest screen size an application will see in normal operation. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#touchscreen` The kind of touch screen attached to the device. |
| ` public int` | `https://developer.android.com/reference/android/content/res/Configuration#uiMode` Bit mask of the ui mode. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/content/res/Configuration#Configuration()() ` <br /> Construct an invalid Configuration. |
| ` https://developer.android.com/reference/android/content/res/Configuration#Configuration(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration o) ` Makes a deep copy suitable for modification. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/content/res/Configuration#compareTo(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration that) ` |
| ` int` | ` https://developer.android.com/reference/android/content/res/Configuration#describeContents()() ` Parcelable methods |
| ` int` | ` https://developer.android.com/reference/android/content/res/Configuration#diff(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration delta) ` Return a bit mask of the differences between this Configuration object and the given one. |
| ` boolean` | ` https://developer.android.com/reference/android/content/res/Configuration#equals(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration that) ` |
| ` boolean` | ` https://developer.android.com/reference/android/content/res/Configuration#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object that) ` Indicates whether some other object is "equal to" this one. |
| ` static https://developer.android.com/reference/android/content/res/Configuration` | ` https://developer.android.com/reference/android/content/res/Configuration#generateDelta(android.content.res.Configuration,%20android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration base, https://developer.android.com/reference/android/content/res/Configuration change) ` Generate a delta Configuration between `base` and `change`. |
| ` int` | ` https://developer.android.com/reference/android/content/res/Configuration#getGrammaticalGender()() ` Returns the user preference for the grammatical gender. |
| ` int` | ` https://developer.android.com/reference/android/content/res/Configuration#getLayoutDirection()() ` Return the layout direction. |
| ` https://developer.android.com/reference/android/os/LocaleList` | ` https://developer.android.com/reference/android/content/res/Configuration#getLocales()() ` Get the locale list. |
| ` int` | ` https://developer.android.com/reference/android/content/res/Configuration#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/content/res/Configuration#isLayoutSizeAtLeast(int)(int size) ` Check if the Configuration's current `https://developer.android.com/reference/android/content/res/Configuration#screenLayout` is at least the given size. |
| ` boolean` | ` https://developer.android.com/reference/android/content/res/Configuration#isNightModeActive()() ` Retuns whether the configuration is in night mode |
| ` boolean` | ` https://developer.android.com/reference/android/content/res/Configuration#isScreenHdr()() ` Return whether the screen has a high dynamic range. |
| ` boolean` | ` https://developer.android.com/reference/android/content/res/Configuration#isScreenRound()() ` Return whether the screen has a round shape. |
| ` boolean` | ` https://developer.android.com/reference/android/content/res/Configuration#isScreenWideColorGamut()() ` Return whether the screen has a wide color gamut and wide color gamut rendering is supported by this device. |
| ` static boolean` | ` https://developer.android.com/reference/android/content/res/Configuration#needNewResources(int,%20int)(int configChanges, int interestingChanges) ` Determines if a new resource needs to be loaded from the bit set of configuration changes returned by `https://developer.android.com/reference/android/content/res/Configuration#updateFrom(android.content.res.Configuration)`. |
| ` void` | ` https://developer.android.com/reference/android/content/res/Configuration#readFromParcel(android.os.Parcel)(https://developer.android.com/reference/android/os/Parcel source) ` |
| ` void` | ` https://developer.android.com/reference/android/content/res/Configuration#setLayoutDirection(java.util.Locale)(https://developer.android.com/reference/java/util/Locale loc) ` Set the layout direction from a Locale. |
| ` void` | ` https://developer.android.com/reference/android/content/res/Configuration#setLocale(java.util.Locale)(https://developer.android.com/reference/java/util/Locale loc) ` Set the locale list to a list of just one locale. |
| ` void` | ` https://developer.android.com/reference/android/content/res/Configuration#setLocales(android.os.LocaleList)(https://developer.android.com/reference/android/os/LocaleList locales) ` Set the locale list. |
| ` void` | ` https://developer.android.com/reference/android/content/res/Configuration#setTo(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration o) ` Sets the fields in this object to those in the given Configuration. |
| ` void` | ` https://developer.android.com/reference/android/content/res/Configuration#setToDefaults()() ` Set this object to the system defaults. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/content/res/Configuration#toString()() ` Returns a string representation of the object. |
| ` int` | ` https://developer.android.com/reference/android/content/res/Configuration#updateFrom(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration delta) ` Copies the fields from delta into this Configuration object, keeping track of which ones have changed. |
| ` void` | ` https://developer.android.com/reference/android/content/res/Configuration#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||
| From interface ` https://developer.android.com/reference/java/lang/Comparable ` |---|---| | ` abstract int` | ` https://developer.android.com/reference/java/lang/Comparable#compareTo(T)(https://developer.android.com/reference/android/content/res/Configuration o) ` Compares this object with the specified object for order. | ||
| From interface ` https://developer.android.com/reference/android/os/Parcelable ` |---|---| | ` abstract int` | ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | | ` abstract void` | ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### COLOR_MODE_HDR_MASK

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int COLOR_MODE_HDR_MASK
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: bits that encode the dynamic range of the screen.

<br />

Constant Value:

12
(0x0000000c)


### COLOR_MODE_HDR_NO

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int COLOR_MODE_HDR_NO
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_MASK` value
indicating that the screen is not HDR (low/standard dynamic range).

Corresponds to the `-lowdr` resource qualifier.

<br />

<br />

Constant Value:

4
(0x00000004)


### COLOR_MODE_HDR_SHIFT

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int COLOR_MODE_HDR_SHIFT
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: bits shift to get the screen dynamic range.

<br />

Constant Value:

2
(0x00000002)


### COLOR_MODE_HDR_UNDEFINED

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int COLOR_MODE_HDR_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_MASK` value
indicating that it is unknown whether or not the screen is HDR.

<br />

Constant Value:

0
(0x00000000)


### COLOR_MODE_HDR_YES

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int COLOR_MODE_HDR_YES
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_MASK` value
indicating that the screen is HDR (dynamic range).

Corresponds to the `-highdr` resource qualifier.

<br />

<br />

Constant Value:

8
(0x00000008)


### COLOR_MODE_UNDEFINED

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int COLOR_MODE_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a value indicating that the color mode is undefined

<br />

Constant Value:

0
(0x00000000)


### COLOR_MODE_WIDE_COLOR_GAMUT_MASK

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int COLOR_MODE_WIDE_COLOR_GAMUT_MASK
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: bits that encode whether the screen is wide gamut.

<br />

Constant Value:

3
(0x00000003)


### COLOR_MODE_WIDE_COLOR_GAMUT_NO

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int COLOR_MODE_WIDE_COLOR_GAMUT_NO
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_MASK` value
indicating that the screen is not wide gamut.

Corresponds to the `-nowidecg` resource qualifier.

<br />

<br />

Constant Value:

1
(0x00000001)


### COLOR_MODE_WIDE_COLOR_GAMUT_UNDEFINED

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int COLOR_MODE_WIDE_COLOR_GAMUT_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_MASK` value
indicating that it is unknown whether or not the screen is wide gamut.

<br />

Constant Value:

0
(0x00000000)


### COLOR_MODE_WIDE_COLOR_GAMUT_YES

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int COLOR_MODE_WIDE_COLOR_GAMUT_YES
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#colorMode`: a `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_MASK` value
indicating that the screen is wide gamut.

Corresponds to the `-widecg` resource qualifier.

<br />

<br />

Constant Value:

2
(0x00000002)


### DENSITY_DPI_UNDEFINED

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int DENSITY_DPI_UNDEFINED
```

Default value for `https://developer.android.com/reference/android/content/res/Configuration#densityDpi` indicating that no width
has been specified.

<br />

Constant Value:

0
(0x00000000)


### FONT_WEIGHT_ADJUSTMENT_UNDEFINED

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FONT_WEIGHT_ADJUSTMENT_UNDEFINED
```

An undefined fontWeightAdjustment.

<br />

Constant Value:

2147483647
(0x7fffffff)


### GRAMMATICAL_GENDER_FEMININE

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int GRAMMATICAL_GENDER_FEMININE
```

Constant for grammatical gender: to indicate the terms of address the user
preferred in an application is feminine.

<br />

Constant Value:

2
(0x00000002)


### GRAMMATICAL_GENDER_MASCULINE

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int GRAMMATICAL_GENDER_MASCULINE
```

Constant for grammatical gender: to indicate the terms of address the user
preferred in an application is masculine.

<br />

Constant Value:

3
(0x00000003)


### GRAMMATICAL_GENDER_NEUTRAL

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int GRAMMATICAL_GENDER_NEUTRAL
```

Constant for grammatical gender: to indicate the terms of address the user
preferred in an application is neuter.

<br />

Constant Value:

1
(0x00000001)


### GRAMMATICAL_GENDER_NOT_SPECIFIED

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int GRAMMATICAL_GENDER_NOT_SPECIFIED
```

Constant for grammatical gender: to indicate the user has not specified the terms
of address for the application.

<br />

Constant Value:

0
(0x00000000)


### HARDKEYBOARDHIDDEN_NO

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HARDKEYBOARDHIDDEN_NO
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#hardKeyboardHidden`, value corresponding to the
physical keyboard being exposed.

<br />

Constant Value:

1
(0x00000001)


### HARDKEYBOARDHIDDEN_UNDEFINED

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HARDKEYBOARDHIDDEN_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#hardKeyboardHidden`: a value indicating that no value has been set.

<br />

Constant Value:

0
(0x00000000)


### HARDKEYBOARDHIDDEN_YES

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HARDKEYBOARDHIDDEN_YES
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#hardKeyboardHidden`, value corresponding to the
physical keyboard being hidden.

<br />

Constant Value:

2
(0x00000002)


### KEYBOARDHIDDEN_NO

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYBOARDHIDDEN_NO
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboardHidden`, value corresponding to the
[keysexposed](https://developer.android.com/guide/topics/resources/providing-resources#KeyboardAvailQualifier)
resource qualifier.

<br />

Constant Value:

1
(0x00000001)


### KEYBOARDHIDDEN_UNDEFINED

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYBOARDHIDDEN_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboardHidden`: a value indicating that no value has been set.

<br />

Constant Value:

0
(0x00000000)


### KEYBOARDHIDDEN_YES

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYBOARDHIDDEN_YES
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboardHidden`, value corresponding to the
[keyshidden](https://developer.android.com/guide/topics/resources/providing-resources#KeyboardAvailQualifier)
resource qualifier.

<br />

Constant Value:

2
(0x00000002)


### KEYBOARD_12KEY

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYBOARD_12KEY
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboard`, value corresponding to the
[12key](https://developer.android.com/guide/topics/resources/providing-resources#ImeQualifier)
resource qualifier.

<br />

Constant Value:

3
(0x00000003)


### KEYBOARD_NOKEYS

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYBOARD_NOKEYS
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboard`, value corresponding to the
[nokeys](https://developer.android.com/guide/topics/resources/providing-resources#ImeQualifier)
resource qualifier.

<br />

Constant Value:

1
(0x00000001)


### KEYBOARD_QWERTY

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYBOARD_QWERTY
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboard`, value corresponding to the
[qwerty](https://developer.android.com/guide/topics/resources/providing-resources#ImeQualifier)
resource qualifier.

<br />

Constant Value:

2
(0x00000002)


### KEYBOARD_UNDEFINED

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYBOARD_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#keyboard`: a value indicating that no value has been set.

<br />

Constant Value:

0
(0x00000000)


### MNC_ZERO

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int MNC_ZERO
```

Constant used to to represent MNC (Mobile Network Code) zero.
0 cannot be used, since it is used to represent an undefined MNC.

<br />

Constant Value:

65535
(0x0000ffff)


### NAVIGATIONHIDDEN_NO

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATIONHIDDEN_NO
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigationHidden`, value corresponding to the
[navexposed](https://developer.android.com/guide/topics/resources/providing-resources#NavAvailQualifier)
resource qualifier.

<br />

Constant Value:

1
(0x00000001)


### NAVIGATIONHIDDEN_UNDEFINED

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATIONHIDDEN_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigationHidden`: a value indicating that no value has been set.

<br />

Constant Value:

0
(0x00000000)


### NAVIGATIONHIDDEN_YES

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATIONHIDDEN_YES
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigationHidden`, value corresponding to the
[navhidden](https://developer.android.com/guide/topics/resources/providing-resources#NavAvailQualifier)
resource qualifier.

<br />

Constant Value:

2
(0x00000002)


### NAVIGATION_DPAD

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_DPAD
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigation`, value corresponding to the
[dpad](https://developer.android.com/guide/topics/resources/providing-resources#NavigationQualifier)
resource qualifier.

<br />

Constant Value:

2
(0x00000002)


### NAVIGATION_NONAV

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_NONAV
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigation`, value corresponding to the
[nonav](https://developer.android.com/guide/topics/resources/providing-resources#NavigationQualifier)
resource qualifier.

<br />

Constant Value:

1
(0x00000001)


### NAVIGATION_TRACKBALL

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_TRACKBALL
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigation`, value corresponding to the
[trackball](https://developer.android.com/guide/topics/resources/providing-resources#NavigationQualifier)
resource qualifier.

<br />

Constant Value:

3
(0x00000003)


### NAVIGATION_UNDEFINED

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigation`: a value indicating that no value has been set.

<br />

Constant Value:

0
(0x00000000)


### NAVIGATION_WHEEL

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NAVIGATION_WHEEL
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#navigation`, value corresponding to the
[wheel](https://developer.android.com/guide/topics/resources/providing-resources#NavigationQualifier)
resource qualifier.

<br />

Constant Value:

4
(0x00000004)


### ORIENTATION_LANDSCAPE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ORIENTATION_LANDSCAPE
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#orientation`, value corresponding to the
[land](https://developer.android.com/guide/topics/resources/providing-resources#OrientationQualifier)
resource qualifier.

<br />

Constant Value:

2
(0x00000002)


### ORIENTATION_PORTRAIT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ORIENTATION_PORTRAIT
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#orientation`, value corresponding to the
[port](https://developer.android.com/guide/topics/resources/providing-resources#OrientationQualifier)
resource qualifier.

<br />

Constant Value:

1
(0x00000001)


### ORIENTATION_SQUARE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ORIENTATION_SQUARE
```


**This constant was deprecated
in API level 16.**   

Not currently supported or used.

<br />

<br />

Constant Value:

3
(0x00000003)


### ORIENTATION_UNDEFINED

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ORIENTATION_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#orientation`: a value indicating that no value has been set.

<br />

Constant Value:

0
(0x00000000)


### SCREENLAYOUT_LAYOUTDIR_LTR

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_LAYOUTDIR_LTR
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_MASK`
value indicating that a layout dir has been set to LTR.

<br />

Constant Value:

64
(0x00000040)


### SCREENLAYOUT_LAYOUTDIR_MASK

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_LAYOUTDIR_MASK
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: bits that encode the layout direction.

<br />

Constant Value:

192
(0x000000c0)


### SCREENLAYOUT_LAYOUTDIR_RTL

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_LAYOUTDIR_RTL
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_MASK`
value indicating that a layout dir has been set to RTL.

<br />

Constant Value:

128
(0x00000080)


### SCREENLAYOUT_LAYOUTDIR_SHIFT

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_LAYOUTDIR_SHIFT
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: bits shift to get the layout direction.

<br />

Constant Value:

6
(0x00000006)


### SCREENLAYOUT_LAYOUTDIR_UNDEFINED

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_LAYOUTDIR_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_MASK`
value indicating that no layout dir has been set.

<br />

Constant Value:

0
(0x00000000)


### SCREENLAYOUT_LONG_MASK

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_LONG_MASK
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: bits that encode the aspect ratio.

<br />

Constant Value:

48
(0x00000030)


### SCREENLAYOUT_LONG_NO

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_LONG_NO
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_MASK`
value that corresponds to the
[notlong](https://developer.android.com/guide/topics/resources/providing-resources#ScreenAspectQualifier)
resource qualifier.

<br />

Constant Value:

16
(0x00000010)


### SCREENLAYOUT_LONG_UNDEFINED

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_LONG_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_MASK`
value indicating that no size has been set.

<br />

Constant Value:

0
(0x00000000)


### SCREENLAYOUT_LONG_YES

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_LONG_YES
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_MASK`
value that corresponds to the
[long](https://developer.android.com/guide/topics/resources/providing-resources#ScreenAspectQualifier)
resource qualifier.

<br />

Constant Value:

32
(0x00000020)


### SCREENLAYOUT_ROUND_MASK

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_ROUND_MASK
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: bits that encode roundness of the screen.

<br />

Constant Value:

768
(0x00000300)


### SCREENLAYOUT_ROUND_NO

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_ROUND_NO
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_MASK` value indicating
that the screen does not have a rounded shape.

<br />

Constant Value:

256
(0x00000100)


### SCREENLAYOUT_ROUND_UNDEFINED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_ROUND_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_MASK` value indicating
that it is unknown whether or not the screen has a round shape.

<br />

Constant Value:

0
(0x00000000)


### SCREENLAYOUT_ROUND_YES

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_ROUND_YES
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_MASK` value indicating
that the screen has a rounded shape. Corners may not be visible to the user;
developers should pay special attention to the `https://developer.android.com/reference/android/view/WindowInsets` delivered
to views for more information about ensuring content is not obscured.

Corresponds to the `-round` resource qualifier.

<br />

<br />

Constant Value:

512
(0x00000200)


### SCREENLAYOUT_SIZE_LARGE

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_SIZE_LARGE
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK`
value indicating the screen is at least approximately 480x640 dp units,
corresponds to the
[large](https://developer.android.com/guide/topics/resources/providing-resources#ScreenSizeQualifier)
resource qualifier.
See [Supporting
Multiple Screens](https://developer.android.com/guide/practices/screens_support) for more information.

<br />

Constant Value:

3
(0x00000003)


### SCREENLAYOUT_SIZE_MASK

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_SIZE_MASK
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: bits that encode the size.

<br />

Constant Value:

15
(0x0000000f)


### SCREENLAYOUT_SIZE_NORMAL

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_SIZE_NORMAL
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK`
value indicating the screen is at least approximately 320x470 dp units,
corresponds to the
[normal](https://developer.android.com/guide/topics/resources/providing-resources#ScreenSizeQualifier)
resource qualifier.
See [Supporting
Multiple Screens](https://developer.android.com/guide/practices/screens_support) for more information.

<br />

Constant Value:

2
(0x00000002)


### SCREENLAYOUT_SIZE_SMALL

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_SIZE_SMALL
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK`
value indicating the screen is at least approximately 320x426 dp units,
corresponds to the
[small](https://developer.android.com/guide/topics/resources/providing-resources#ScreenSizeQualifier)
resource qualifier.
See [Supporting
Multiple Screens](https://developer.android.com/guide/practices/screens_support) for more information.

<br />

Constant Value:

1
(0x00000001)


### SCREENLAYOUT_SIZE_UNDEFINED

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_SIZE_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK`
value indicating that no size has been set.

<br />

Constant Value:

0
(0x00000000)


### SCREENLAYOUT_SIZE_XLARGE

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_SIZE_XLARGE
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK`
value indicating the screen is at least approximately 720x960 dp units,
corresponds to the
[xlarge](https://developer.android.com/guide/topics/resources/providing-resources#ScreenSizeQualifier)
resource qualifier.
See [Supporting
Multiple Screens](https://developer.android.com/guide/practices/screens_support) for more information.

<br />

Constant Value:

4
(0x00000004)


### SCREENLAYOUT_UNDEFINED

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREENLAYOUT_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#screenLayout`: a value indicating that screenLayout is undefined

<br />

Constant Value:

0
(0x00000000)


### SCREEN_HEIGHT_DP_UNDEFINED

Added in [API level 13](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREEN_HEIGHT_DP_UNDEFINED
```

Default value for `https://developer.android.com/reference/android/content/res/Configuration#screenHeightDp` indicating that no width
has been specified.

<br />

Constant Value:

0
(0x00000000)


### SCREEN_WIDTH_DP_UNDEFINED

Added in [API level 13](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREEN_WIDTH_DP_UNDEFINED
```

Default value for `https://developer.android.com/reference/android/content/res/Configuration#screenWidthDp` indicating that no width
has been specified.

<br />

Constant Value:

0
(0x00000000)


### SMALLEST_SCREEN_WIDTH_DP_UNDEFINED

Added in [API level 13](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SMALLEST_SCREEN_WIDTH_DP_UNDEFINED
```

Default value for `https://developer.android.com/reference/android/content/res/Configuration#smallestScreenWidthDp` indicating that no width
has been specified.

<br />

Constant Value:

0
(0x00000000)


### TOUCHSCREEN_FINGER

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TOUCHSCREEN_FINGER
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#touchscreen`, value corresponding to the
[finger](https://developer.android.com/guide/topics/resources/providing-resources#TouchscreenQualifier)
resource qualifier.

<br />

Constant Value:

3
(0x00000003)


### TOUCHSCREEN_NOTOUCH

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TOUCHSCREEN_NOTOUCH
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#touchscreen`, value corresponding to the
[notouch](https://developer.android.com/guide/topics/resources/providing-resources#TouchscreenQualifier)
resource qualifier.

<br />

Constant Value:

1
(0x00000001)


### TOUCHSCREEN_STYLUS

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TOUCHSCREEN_STYLUS
```


**This constant was deprecated
in API level 16.**   

Not currently supported or used.

<br />

<br />

Constant Value:

2
(0x00000002)


### TOUCHSCREEN_UNDEFINED

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TOUCHSCREEN_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#touchscreen`: a value indicating that no value has been set.

<br />

Constant Value:

0
(0x00000000)


### UI_MODE_NIGHT_MASK

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_NIGHT_MASK
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: bits that encode the night mode.

<br />

Constant Value:

48
(0x00000030)


### UI_MODE_NIGHT_NO

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_NIGHT_NO
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_MASK`
value that corresponds to the
[notnight](https://developer.android.com/guide/topics/resources/providing-resources#NightQualifier)
resource qualifier.

<br />

Constant Value:

16
(0x00000010)


### UI_MODE_NIGHT_UNDEFINED

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_NIGHT_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_MASK`
value indicating that no mode type has been set.

<br />

Constant Value:

0
(0x00000000)


### UI_MODE_NIGHT_YES

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_NIGHT_YES
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_MASK`
value that corresponds to the
[night](https://developer.android.com/guide/topics/resources/providing-resources#NightQualifier)
resource qualifier.

<br />

Constant Value:

32
(0x00000020)


### UI_MODE_TYPE_APPLIANCE

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_TYPE_APPLIANCE
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK`
value that corresponds to the
[appliance](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier)
resource qualifier.

<br />

Constant Value:

5
(0x00000005)


### UI_MODE_TYPE_CAR

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_TYPE_CAR
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK`
value that corresponds to the
[car](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier)
resource qualifier.

<br />

Constant Value:

3
(0x00000003)


### UI_MODE_TYPE_DESK

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_TYPE_DESK
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK`
value that corresponds to the
[desk](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier)
resource qualifier.

<br />

Constant Value:

2
(0x00000002)


### UI_MODE_TYPE_MASK

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_TYPE_MASK
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: bits that encode the mode type.

<br />

Constant Value:

15
(0x0000000f)


### UI_MODE_TYPE_NORMAL

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_TYPE_NORMAL
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK`
value that corresponds to
[no
UI mode](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier) resource qualifier specified.

<br />

Constant Value:

1
(0x00000001)


### UI_MODE_TYPE_TELEVISION

Added in [API level 13](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_TYPE_TELEVISION
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK`
value that corresponds to the
[television](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier)
resource qualifier.

<br />

Constant Value:

4
(0x00000004)


### UI_MODE_TYPE_UNDEFINED

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_TYPE_UNDEFINED
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK`
value indicating that no mode type has been set.

<br />

Constant Value:

0
(0x00000000)


### UI_MODE_TYPE_VR_HEADSET

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_TYPE_VR_HEADSET
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK`
value that corresponds to the
[vrheadset](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier)
resource qualifier.

<br />

Constant Value:

7
(0x00000007)


### UI_MODE_TYPE_WATCH

Added in [API level 20](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UI_MODE_TYPE_WATCH
```

Constant for `https://developer.android.com/reference/android/content/res/Configuration#uiMode`: a `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK`
value that corresponds to the
[watch](https://developer.android.com/guide/topics/resources/providing-resources#UiModeQualifier)
resource qualifier.

<br />

Constant Value:

6
(0x00000006)


## Fields

### CREATOR

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<Configuration> CREATOR
```

<br />

<br />

### colorMode

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int colorMode
```

Bit mask of color capabilities of the screen. Currently there are two fields:

The `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_MASK` bits define the color gamut of
the screen. They may be one of
`https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_NO` or `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_WIDE_COLOR_GAMUT_YES`.

The `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_MASK` defines the dynamic range of the screen. They may be
one of `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_NO` or `https://developer.android.com/reference/android/content/res/Configuration#COLOR_MODE_HDR_YES`.

See [Supporting
Multiple Screens](https://developer.android.com/guide/practices/screens_support) for more information.

<br />

<br />

### densityDpi

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int densityDpi
```

The target screen density being rendered to,
corresponding to
[density](https://developer.android.com/guide/topics/resources/providing-resources#DensityQualifier)
resource qualifier. Set to
`https://developer.android.com/reference/android/content/res/Configuration#DENSITY_DPI_UNDEFINED` if no density is specified.

<br />

### fontScale

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float fontScale
```

Current user preference for the scaling factor for fonts, relative
to the base density scaling.

Note: Please do not use this to hardcode font size equations. The equation for font
scaling is now non-linear; this coefficient is no longer used as a direct multiplier to
determine font size. It exists for informational purposes only.

Please use `https://developer.android.com/reference/android/util/TypedValue#applyDimension(int,%20float,%20android.util.DisplayMetrics)` or
`https://developer.android.com/reference/android/util/TypedValue#deriveDimension(int,%20float,%20android.util.DisplayMetrics)` to convert
between scaled font size dimensions and pixels.

<br />

### fontWeightAdjustment

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int fontWeightAdjustment
```

Adjustment in text font weight. Used to reflect the current user preference for increasing
font weight.

If the text font weight is less than the minimum of 1, 1 will be used. If the font weight
exceeds the maximum of 1000, 1000 will be used.

<br />

**See also:**

- `https://developer.android.com/reference/android/graphics/Typeface#create(android.graphics.Typeface,%20int,%20boolean)`
- `https://developer.android.com/reference/android/graphics/fonts/FontStyle#FONT_WEIGHT_MIN`
- `https://developer.android.com/reference/android/graphics/fonts/FontStyle#FONT_WEIGHT_MAX`

### hardKeyboardHidden

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hardKeyboardHidden
```

A flag indicating whether the hard keyboard has been hidden. This will
be set on a device with a mechanism to hide the keyboard from the
user, when that mechanism is closed. One of:
`https://developer.android.com/reference/android/content/res/Configuration#HARDKEYBOARDHIDDEN_NO`, `https://developer.android.com/reference/android/content/res/Configuration#HARDKEYBOARDHIDDEN_YES`.

<br />

### keyboard

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int keyboard
```

The kind of keyboard attached to the device.
One of: `https://developer.android.com/reference/android/content/res/Configuration#KEYBOARD_NOKEYS`, `https://developer.android.com/reference/android/content/res/Configuration#KEYBOARD_QWERTY`,
`https://developer.android.com/reference/android/content/res/Configuration#KEYBOARD_12KEY`.

<br />

### keyboardHidden

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int keyboardHidden
```

A flag indicating whether any keyboard is available. Unlike
`https://developer.android.com/reference/android/content/res/Configuration#hardKeyboardHidden`, this also takes into account a soft
keyboard, so if the hard keyboard is hidden but there is soft
keyboard available, it will be set to NO. Value is one of:
`https://developer.android.com/reference/android/content/res/Configuration#KEYBOARDHIDDEN_NO`, `https://developer.android.com/reference/android/content/res/Configuration#KEYBOARDHIDDEN_YES`.

<br />

### locale

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Locale locale
```


**This field was deprecated
in API level 24.**   

Do not set or read this directly. Use `https://developer.android.com/reference/android/content/res/Configuration#getLocales()` and
`https://developer.android.com/reference/android/content/res/Configuration#setLocales(android.os.LocaleList)`. If only the primary locale is needed,
`getLocales().get(0)` is now the preferred accessor.

Current user preference for the locale, corresponding to
[locale](https://developer.android.com/guide/topics/resources/providing-resources#LocaleQualifier)
resource qualifier.

<br />

### mcc

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int mcc
```

IMSI MCC (Mobile Country Code), corresponding to
[mcc](https://developer.android.com/guide/topics/resources/providing-resources#MccQualifier)
resource qualifier. 0 if undefined.

<br />

### mnc

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int mnc
```

IMSI MNC (Mobile Network Code), corresponding to
[mnc](https://developer.android.com/guide/topics/resources/providing-resources#MccQualifier)
resource qualifier. 0 if undefined. Note that the actual MNC may be 0; in order to check
for this use the `https://developer.android.com/reference/android/content/res/Configuration#MNC_ZERO` symbol.

<br />

### navigation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int navigation
```

The kind of navigation method available on the device.
One of: `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATION_NONAV`, `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATION_DPAD`,
`https://developer.android.com/reference/android/content/res/Configuration#NAVIGATION_TRACKBALL`, `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATION_WHEEL`.

<br />

### navigationHidden

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int navigationHidden
```

A flag indicating whether any 5-way or DPAD navigation available.
This will be set on a device with a mechanism to hide the navigation
controls from the user, when that mechanism is closed. One of:
`https://developer.android.com/reference/android/content/res/Configuration#NAVIGATIONHIDDEN_NO`, `https://developer.android.com/reference/android/content/res/Configuration#NAVIGATIONHIDDEN_YES`.

<br />

### orientation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int orientation
```

Overall orientation of the screen. May be one of
`https://developer.android.com/reference/android/content/res/Configuration#ORIENTATION_LANDSCAPE`, `https://developer.android.com/reference/android/content/res/Configuration#ORIENTATION_PORTRAIT`.


Value is one of the following:

- `https://developer.android.com/reference/android/content/res/Configuration#ORIENTATION_UNDEFINED`
- `https://developer.android.com/reference/android/content/res/Configuration#ORIENTATION_PORTRAIT`
- `https://developer.android.com/reference/android/content/res/Configuration#ORIENTATION_LANDSCAPE`
- `https://developer.android.com/reference/android/content/res/Configuration#ORIENTATION_SQUARE`

### screenHeightDp

Added in [API level 13](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int screenHeightDp
```

The height of the available screen space in dp units.

| **Note:** If the app targets `https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM` or after, the height measurement reflects the window size without excluding insets. Otherwise, the measurement excludes window insets even when the app is displayed edge to edge using `https://developer.android.com/reference/android/view/Window#setDecorFitsSystemWindows(boolean)`.
Use `https://developer.android.com/reference/android/view/WindowMetrics#getBounds()` to always obtain the vertical display area available to an app or embedded activity including the area occupied by window insets. A version of the API is also available for use on older platforms through `https://developer.android.com/reference/androidx/window/layout/WindowMetrics.html`.

Corresponds to the
[available height](https://developer.android.com/guide/topics/resources/providing-resources#AvailableWidthHeightQualifier) resource qualifier. Defaults to
`https://developer.android.com/reference/android/content/res/Configuration#SCREEN_HEIGHT_DP_UNDEFINED` if no height is specified.

In multi-window mode, equals the height of the available display area
of the app window, not the available display area of the device screen
(for example, when apps are displayed one above another in split-screen
mode in portrait orientation).

For embedded activities, equals the height of the individual
activities, not the height of the app window or the device screen.

In multiple-screen scenarios, the height measurement can span screens.
For example, if the app is spanning both screens of a dual-screen device
rotated 90 degrees (one screen above the other), `screenHeightDp`
represents the height of both screens excluding the area occupied by
window insets. When the app is restricted to a single screen in a
multiple-screen environment, `screenHeightDp` is the height of the
screen on which the app is displayed excluding window insets.

If the app targets `https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM` or after,
it is the same as `https://developer.android.com/reference/android/view/WindowMetrics`, but is expressed rounded to the nearest
dp rather than px.

Otherwise, differs from `https://developer.android.com/reference/android/view/WindowMetrics` by not including
window insets in the height measurement and by expressing the measurement
in dp rather than px. Use `screenHeightDp` to obtain the height of
the display area available to an app or embedded activity excluding the
area occupied by window insets.

<br />

### screenLayout

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int screenLayout
```

Bit mask of overall layout of the screen. Currently there are four
fields:

The `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_MASK` bits define the overall size
of the screen. They may be one of
`https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_SMALL`, `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_NORMAL`,
`https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_LARGE`, or `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_XLARGE`.

The `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_MASK` defines whether the screen
is wider/taller than normal. They may be one of
`https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_NO` or `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LONG_YES`.

The `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_MASK` defines whether the screen layout
is either LTR or RTL. They may be one of
`https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_LTR` or `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_RTL`.

The `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_MASK` defines whether the screen has a rounded
shape. They may be one of `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_NO` or `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_ROUND_YES`.

See [Supporting
Multiple Screens](https://developer.android.com/guide/practices/screens_support) for more information.

<br />

<br />

### screenWidthDp

Added in [API level 13](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int screenWidthDp
```

The width of the available screen space in dp units.

| **Note:** If the app targets `https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM` or after, the width measurement reflects the window size without excluding insets. Otherwise, the measurement excludes window insets even when the app is displayed edge to edge using `https://developer.android.com/reference/android/view/Window#setDecorFitsSystemWindows(boolean)`.
Use `https://developer.android.com/reference/android/view/WindowMetrics#getBounds()` to always obtain the horizontal display area available to an app or embedded activity including the area occupied by window insets. A version of the API is also available for use on older platforms through `https://developer.android.com/reference/androidx/window/layout/WindowMetrics.html`.

Corresponds to the
[available width](https://developer.android.com/guide/topics/resources/providing-resources#AvailableWidthHeightQualifier) resource qualifier. Defaults to
`https://developer.android.com/reference/android/content/res/Configuration#SCREEN_WIDTH_DP_UNDEFINED` if no width is specified.

In multi-window mode, equals the width of the available display area
of the app window, not the available display area of the device screen
(for example, when apps are displayed side by side in split-screen mode
in landscape orientation).

For embedded activities, equals the width of the individual
activities, not the width of the app window or the device screen.

In multiple-screen scenarios, the width measurement can span screens.
For example, if the app is spanning both screens of a dual-screen device
(with the screens side by side), `screenWidthDp` represents the
width of both screens excluding the area occupied by window insets. When
the app is restricted to a single screen in a multiple-screen
environment, `screenWidthDp` is the width of the screen on which
the app is displayed excluding window insets.

If the app targets `https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM` or after,
it is the same as `https://developer.android.com/reference/android/view/WindowMetrics`, but is expressed rounded to the nearest
dp rather than px.

Otherwise, differs from `https://developer.android.com/reference/android/view/WindowMetrics` by not including
window insets in the width measurement and by expressing the measurement
in dp rather than px. Use `screenWidthDp` to obtain the width of
the display area available to an app or embedded activity excluding the
area occupied by window insets.

<br />

### smallestScreenWidthDp

Added in [API level 13](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int smallestScreenWidthDp
```

The smallest screen size an application will see in normal operation.
Corresponds to the
[smallest width](https://developer.android.com/guide/topics/resources/providing-resources#SmallestScreenWidthQualifier) resource qualifier. This is the smallest value of
`https://developer.android.com/reference/android/content/res/Configuration#screenWidthDp` and `https://developer.android.com/reference/android/content/res/Configuration#screenHeightDp` in both portrait and
landscape orientations. Defaults to
`https://developer.android.com/reference/android/content/res/Configuration#SMALLEST_SCREEN_WIDTH_DP_UNDEFINED` if no width is specified.

<br />

### touchscreen

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int touchscreen
```

The kind of touch screen attached to the device.
One of: `https://developer.android.com/reference/android/content/res/Configuration#TOUCHSCREEN_NOTOUCH`, `https://developer.android.com/reference/android/content/res/Configuration#TOUCHSCREEN_FINGER`.

<br />

### uiMode

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int uiMode
```

Bit mask of the ui mode. Currently there are two fields:

The `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_MASK` bits define the overall ui mode of the
device. They may be one of `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_UNDEFINED`,
`https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_NORMAL`, `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_DESK`,
`https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_CAR`, `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_TELEVISION`,
`https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_APPLIANCE`, `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_WATCH`,
or `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_TYPE_VR_HEADSET`.

The `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_MASK` defines whether the screen
is in a special mode. They may be one of `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_UNDEFINED`,
`https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_NO` or `https://developer.android.com/reference/android/content/res/Configuration#UI_MODE_NIGHT_YES`.

<br />

## Public constructors

### Configuration

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Configuration ()
```

<br />

Construct an invalid Configuration. This state is only suitable for constructing a
Configuration delta that will be applied to some valid Configuration object. In order to
create a valid standalone Configuration, you must call `https://developer.android.com/reference/android/content/res/Configuration#setToDefaults()`.

Example:

```scdoc
     Configuration validConfig = new Configuration();
     validConfig.setToDefaults();

     Configuration deltaOnlyConfig = new Configuration();
     deltaOnlyConfig.orientation = Configuration.ORIENTATION_LANDSCAPE;

     validConfig.updateFrom(deltaOnlyConfig);
 
```

<br />

<br />

### Configuration

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Configuration (Configuration o)
```

Makes a deep copy suitable for modification.

<br />

| Parameters ||
|---|---|
| `o` | `Configuration` <br /> |

## Public methods

### compareTo

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int compareTo (Configuration that)
```

<br />

<br />

| Parameters ||
|---|---|
| `that` | `Configuration` <br /> |

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

### describeContents

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Parcelable methods

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### diff

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int diff (Configuration delta)
```

Return a bit mask of the differences between this Configuration
object and the given one. Does not change the values of either. Any
undefined fields in <var translate="no">delta</var> are ignored.

<br />

| Parameters ||
|---|---|
| `delta` | `Configuration` <br /> |

| Returns ||
|---|---|
| `int` | Returns a bit mask indicating which configuration values have changed. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_MCC` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_MNC` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_LOCALE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_TOUCHSCREEN` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_KEYBOARD` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_KEYBOARD_HIDDEN` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_NAVIGATION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_ORIENTATION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SCREEN_LAYOUT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_UI_MODE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SCREEN_SIZE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SMALLEST_SCREEN_SIZE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_DENSITY` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_LAYOUT_DIRECTION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_COLOR_MODE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_FONT_SCALE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_GRAMMATICAL_GENDER` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_FONT_WEIGHT_ADJUSTMENT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_ASSETS_PATHS` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_RESOURCES_UNUSED` |

### equals

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Configuration that)
```

<br />

<br />

| Parameters ||
|---|---|
| `that` | `Configuration` <br /> |

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

### equals

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object that)
```

Indicates whether some other object is "equal to" this one.


The `equals` method implements an equivalence relation
on non-null object references:

- It is *reflexive*: for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is *symmetric*: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive*: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent*: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.


An equivalence relation partitions the elements it operates on
into *equivalence classes*; all the members of an
equivalence class are equal to each other. Members of an
equivalence class are substitutable for each other, at least
for some purposes.

<br />

| Parameters ||
|---|---|
| `that` | `Object`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### generateDelta

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Configuration generateDelta (Configuration base, 
                Configuration change)
```

Generate a delta Configuration between `base` and `change`. The
resulting delta can be used with `https://developer.android.com/reference/android/content/res/Configuration#updateFrom(android.content.res.Configuration)`.

<br />

Caveat: If the any of the Configuration's members becomes undefined, then `https://developer.android.com/reference/android/content/res/Configuration#updateFrom(android.content.res.Configuration)` will treat it as a no-op and not update that member. This is fine for device configurations as no member is ever undefined.

<br />

<br />

| Parameters ||
|---|---|
| `base` | `Configuration`: This value cannot be `null`. <br /> |
| `change` | `Configuration`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/Configuration` | This value cannot be `null`. <br /> |

### getGrammaticalGender

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getGrammaticalGender ()
```

Returns the user preference for the grammatical gender. Will be
`https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_NOT_SPECIFIED` or
`https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_NEUTRAL` or
`https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_FEMININE` or
`https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_MASCULINE`.

<br />

| Returns ||
|---|---|
| `int` | The preferred grammatical gender. Value is one of the following: - `https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_NOT_SPECIFIED` - `https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_NEUTRAL` - `https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_FEMININE` - `https://developer.android.com/reference/android/content/res/Configuration#GRAMMATICAL_GENDER_MASCULINE` |

### getLayoutDirection

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLayoutDirection ()
```

Return the layout direction. Will be either `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LTR` or
`https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_RTL`.

<br />

| Returns ||
|---|---|
| `int` | Returns `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_RTL` if the configuration is `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_LAYOUTDIR_RTL`, otherwise `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LTR`. <br /> |

### getLocales

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public LocaleList getLocales ()
```

Get the locale list. This is the preferred way for getting the locales (instead of using
the direct accessor to `https://developer.android.com/reference/android/content/res/Configuration#locale`, which would only provide the primary locale).

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/LocaleList` | The locale list. This value cannot be `null`. <br /> |

### hashCode

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
`https://developer.android.com/reference/java/util/HashMap`.


The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### isLayoutSizeAtLeast

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isLayoutSizeAtLeast (int size)
```

Check if the Configuration's current `https://developer.android.com/reference/android/content/res/Configuration#screenLayout` is at
least the given size.

<br />

| Parameters ||
|---|---|
| `size` | `int`: The desired size, either `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_SMALL`, `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_NORMAL`, `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_LARGE`, or `https://developer.android.com/reference/android/content/res/Configuration#SCREENLAYOUT_SIZE_XLARGE`. <br /> |

| Returns ||
|---|---|
| `boolean` | Returns true if the current screen layout size is at least the given size. <br /> |

### isNightModeActive

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isNightModeActive ()
```

Retuns whether the configuration is in night mode

<br />

| Returns ||
|---|---|
| `boolean` | true if night mode is active and false otherwise <br /> |

### isScreenHdr

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isScreenHdr ()
```

Return whether the screen has a high dynamic range.

<br />

| Returns ||
|---|---|
| `boolean` | true if the screen has a high dynamic range, false otherwise <br /> |

### isScreenRound

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isScreenRound ()
```

Return whether the screen has a round shape. Apps may choose to change styling based
on this property, such as the alignment or layout of text or informational icons.

<br />

| Returns ||
|---|---|
| `boolean` | true if the screen is rounded, false otherwise <br /> |

### isScreenWideColorGamut

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isScreenWideColorGamut ()
```

Return whether the screen has a wide color gamut and wide color gamut rendering
is supported by this device.

When true, it implies the screen is colorspace aware but not
necessarily color-managed. The final colors may still be changed by the
screen depending on user settings.

<br />

| Returns ||
|---|---|
| `boolean` | true if the screen has a wide color gamut and wide color gamut rendering is supported, false otherwise <br /> |

### needNewResources

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean needNewResources (int configChanges, 
                int interestingChanges)
```

Determines if a new resource needs to be loaded from the bit set of
configuration changes returned by `https://developer.android.com/reference/android/content/res/Configuration#updateFrom(android.content.res.Configuration)`.

<br />

| Parameters ||
|---|---|
| `configChanges` | `int`: the mask of changes configurations as returned by `https://developer.android.com/reference/android/content/res/Configuration#updateFrom(android.content.res.Configuration)` Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_MCC` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_MNC` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_LOCALE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_TOUCHSCREEN` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_KEYBOARD` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_KEYBOARD_HIDDEN` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_NAVIGATION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_ORIENTATION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SCREEN_LAYOUT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_UI_MODE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SCREEN_SIZE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SMALLEST_SCREEN_SIZE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_DENSITY` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_LAYOUT_DIRECTION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_COLOR_MODE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_FONT_SCALE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_GRAMMATICAL_GENDER` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_FONT_WEIGHT_ADJUSTMENT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_ASSETS_PATHS` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_RESOURCES_UNUSED` |
| `interestingChanges` | `int`: the configuration changes that the resource can handle as given in `https://developer.android.com/reference/android/util/TypedValue#changingConfigurations` Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_MCC` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_MNC` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_LOCALE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_TOUCHSCREEN` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_KEYBOARD` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_KEYBOARD_HIDDEN` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_NAVIGATION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_ORIENTATION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SCREEN_LAYOUT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_UI_MODE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SCREEN_SIZE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SMALLEST_SCREEN_SIZE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_DENSITY` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_LAYOUT_DIRECTION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_COLOR_MODE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_FONT_SCALE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_GRAMMATICAL_GENDER` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_FONT_WEIGHT_ADJUSTMENT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_ASSETS_PATHS` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_RESOURCES_UNUSED` |

| Returns ||
|---|---|
| `boolean` | `true` if the resource needs to be loaded, `false` otherwise <br /> |

### readFromParcel

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void readFromParcel (Parcel source)
```

<br />

<br />

| Parameters ||
|---|---|
| `source` | `Parcel` <br /> |

### setLayoutDirection

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLayoutDirection (Locale loc)
```

Set the layout direction from a Locale.

<br />

| Parameters ||
|---|---|
| `loc` | `Locale`: The Locale. If null will set the layout direction to `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LTR`. If not null will set it to the layout direction corresponding to the Locale. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LTR`
- `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_RTL`

### setLocale

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLocale (Locale loc)
```

Set the locale list to a list of just one locale. This will also set the layout direction
according to the locale.

Note that after this is run, calling `.equals()` on the input locale and the
`https://developer.android.com/reference/android/content/res/Configuration#locale` attribute would return `true` if they are not null, but there is
no guarantee that they would be the same object.

See also the note about layout direction in `https://developer.android.com/reference/android/content/res/Configuration#setLocales(android.os.LocaleList)`.

<br />

| Parameters ||
|---|---|
| `loc` | `Locale`: The locale. Can be null. <br /> |

### setLocales

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLocales (LocaleList locales)
```

Set the locale list. This is the preferred way for setting up the locales (instead of using
the direct accessor or `https://developer.android.com/reference/android/content/res/Configuration#setLocale(java.util.Locale)`). This will also set the layout direction
according to the first locale in the list.

Note that the layout direction will always come from the first locale in the locale list,
even if the locale is not supported by the resources (the resources may only support
another locale further down the list which has a different direction).

<br />

| Parameters ||
|---|---|
| `locales` | `LocaleList`: The locale list. If null, an empty LocaleList will be assigned. <br /> |

### setTo

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTo (Configuration o)
```

Sets the fields in this object to those in the given Configuration.

<br />

| Parameters ||
|---|---|
| `o` | `Configuration`: The Configuration object used to set the values of this Configuration's fields. <br /> |

### setToDefaults

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setToDefaults ()
```

Set this object to the system defaults.

<br />

### toString

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### updateFrom

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int updateFrom (Configuration delta)
```

Copies the fields from delta into this Configuration object, keeping
track of which ones have changed. Any undefined fields in `delta`
are ignored and not copied in to the current Configuration.

<br />

| Parameters ||
|---|---|
| `delta` | `Configuration`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `int` | a bit mask of the changed fields, as per `https://developer.android.com/reference/android/content/res/Configuration#diff(android.content.res.Configuration)` Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_MCC` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_MNC` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_LOCALE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_TOUCHSCREEN` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_KEYBOARD` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_KEYBOARD_HIDDEN` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_NAVIGATION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_ORIENTATION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SCREEN_LAYOUT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_UI_MODE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SCREEN_SIZE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_SMALLEST_SCREEN_SIZE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_DENSITY` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_LAYOUT_DIRECTION` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_COLOR_MODE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_FONT_SCALE` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_GRAMMATICAL_GENDER` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_FONT_WEIGHT_ADJUSTMENT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_ASSETS_PATHS` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#CONFIG_RESOURCES_UNUSED` |

### writeToParcel

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |