Skip to content
Daniel Bergløv edited this page Oct 25, 2015 · 1 revision

Back to Home


The Configuration class can be used to easily collect information about the device's current state among other things. This is mostly a convenience class to simplify getting certain information.

Example

// Get the display's smallest size in dip
Configuration.getDisplaySW();

// Get the display's largest size in dip
Configuration.getDisplayLW();

// Get the display height in dip
Configuration.getDisplayHeight();

// Get the display width in dip
Configuration.getDisplayWidth();

// Check whether or not the display is currently in landscape state
Configuration.inLandscape();