Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.core:core:1.1.0-alpha01

ConfigurationHelper

public final class ConfigurationHelper
extends Object

java.lang.Object
   ↳ androidx.core.content.res.ConfigurationHelper


Helper class which allows access to properties of Configuration in a backward compatible fashion.

Summary

Public methods

static int getDensityDpi(Resources resources)

Returns the target screen density being rendered to.

Inherited methods

Public methods

getDensityDpi

added in version 1.0.0
public static int getDensityDpi (Resources resources)

Returns the target screen density being rendered to.

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

Parameters
resources Resources

Returns
int