# ConfigurationHelper

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/content/res/ConfigurationHelper.java+class:androidx.core.content.res.ConfigurationHelper) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public final class ConfigurationHelper
```

<br />

*** ** * ** ***

Helper class which allows access to properties of `https://developer.android.com/reference/android/content/res/Configuration.html` in a backward compatible fashion.

## Summary

| ### Public methods |
|---|---|
| `static int` | `https://developer.android.com/reference/androidx/core/content/res/ConfigurationHelper#getDensityDpi(android.content.res.Resources)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/res/Resources.html resources)` Returns the target screen density being rendered to. |

## Public methods

### getDensityDpi

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static int getDensityDpi(@NonNull Resources resources)
```

Returns the target screen density being rendered to.

Uses `Configuration.densityDpi` when available, otherwise an approximation is computed and returned.