Class DisplayService.DisplayInfo

  • Enclosing interface:
    DisplayService

    public static class DisplayService.DisplayInfo
    extends Object
    Information about the device's display
    • Method Detail

      • getDensity

        public int getDensity()
        Returns the display density in PPI
        Returns:
        the display density in PPI
      • getWidthPx

        public int getWidthPx()
        Returns the display width in pixels
        Returns:
        the display width in pixels
      • getHeightPx

        public int getHeightPx()
        Returns the display height in pixels
        Returns:
        the display height in pixels
      • getWidthDp

        public float getWidthDp()
        Returns the display width in dp
        Returns:
        the display width in dp
      • getHeightDp

        public float getHeightDp()
        Returns the display height in dp
        Returns:
        the display height in dp