AndroidDisplayMetricsImpl
AndroidDisplayMetricsImpl
class provides the implementation for the DisplayMetrics
interface. This class retrieves and calculates the display metrics of an Android device, such as screen width, height, and DPI (dots per inch) values for both horizontal and vertical axes.
It uses the system's DisplayMetrics
to get the raw pixel values and then calculates the screen dimensions in inches based on the DPI values.
Author
Swapnil Musale
See also
Properties
displayMetrics
holds the system's display metrics, which includes data like screen width, height, and DPI
heightInches
the height of the display in inches This value is calculated using the pixel height and vertical DPI
widthInches
the width of the display in inches This value is calculated using the pixel width and horizontal DPI