Technical docs‎ > ‎

High Density Display with Android Studio







Android Studio 1.5 (and to a lesser extend 1.4) improved support for High density (aka HiDPI or Retina) displays on all platforms compared to previous versions, but given the great variety of system configurations and platforms, there may be remaining issues where the experience is not optimal. This document summarizes the expected behavior on each platform, and potential issues and workarounds.

MacOS
On Mac computers, Android Studio should provide the best experience in all configurations, and does not require any manual configuration: On Retina displays, UI elements are scaled by a factor of 200% and images are rendered in high resolution. There should be no blurriness due to scaling, even in multi-monitor configurations. Note that there is no support for scaling factors other than 100% (non retina displays) and 200% (retina displays).

Windows

On Windows, Android Studio should provide the best experience in all configurations, except for configurations with multiple monitors having different DPI (see https://code.google.com/p/android/issues/detail?id=186007). Android Studio uses the primary display DPI settings to determine the scaling factor of UI elements. For images, if the scaling factor is less than 150% (dpi of 144), normal resolution images are scaled up. If the scaling factor is greater then 150%, high resolution (retina) images are used, and scaled to the appropriate scaling factor. If the scaling factor is not exactly 100% (dpi of 96) or 200% (dpi of 192), image may appear slightly blurry due to scaling.

Linux

On Linux, Android Studio should provide an experience similar to Windows. However, given the number of configurations, it is possible Android Studio is unable to detect the correct value of the system DPI. Currently, the scaling factor is determined by looking at the "Text Scaling Factor" (or similar), then at the XWindow system DPI setting. When troubleshooting a scaling issue, it can be useful to run the font-config-info tool to look at various system settings.

Note: If Android Studio does not detect the right system DPI, you can manually set it via a property; look for "hidpi.system.dpi.override" in the troubleshoot section below for details.

FAQ & troubleshooting

Q: I am running Android Studio on Windows, and fonts and images look blurry (or pixelated). What's going on?
A: There are a few known cases where this can happen
  1. After changing the Windows font size in "Control Panel\All Control Panel Items\Display". The workaround is to sign out from Windows and sign back in.
  2. On a multi-monitor setup, on windows 8.1+, when moving the Android Studio window from one display to another display with a different resolution/dpi. A common configuration where this can happen is when using a laptop with a high resolution display connected to a monitor with a "regular" resolution. There is no known workaround at this time (see bug https://code.google.com/p/android/issues/detail?id=186007).
  3. It seems older version of the JRE 1.8 had an issue for blurry fonts (JRE 1.8.0_25-b18 amd64 in particular, see bug 192316.) The workaround is to update to a newer version of the JRE.
Q: Android Studio UI looks fine and the right size, except for the editor font is too small (or too big) compared to the rest of the UI elements. What's going on?
A: This can happen when a custom editor scheme is active. Go to the "File > Settings" menu, then "Editor > Colors and Fonts > Font" and change the size of the editor font. Note the when the default scheme is active, the editor font size is automatically scaled (see bug https://code.google.com/p/android/issues/detail?id=186920)

Q: Some UI elements of Fonts of Android Studio are the right size, while other are too small (or too big). What's going on?
A: This is probably a bug (see https://code.google.com/p/android/issues/detail?id=186923). Please file a bug in "Help > Submit Feedback" with a screenshot and as much information as possible on your system configuration.

Q: Android Studio UI looks fine and the right size, except for some particular icon is blurry (or pixelated), or some text is too small or too big. What's going on?
A: This is probably a bug, where that particular element has not been fully updated for HiDPI support. Please file a bug in "Help > Submit Feedback" with a screenshot and as much information as possible on your system configuration.

Q: What are the "hidpi" and "hidpi.system.dpi.override" properties about?
A: By default, Android Studio examines various system settings to figure out the DPI setting of the display, and then applies a scaling factor to UI elements according to this setting. A DPI setting of 96 corresponds to a scaling factor of 100% (i.e. no scaling), a DPI setting of 192 corresponds to a scaling factor of 200% (i.e. the size of UI elements is doubled). Android Studio currently supports DPI settings in the range of 96 (100% scaling) to 288 (300% scaling). The "hidpi" and "hidpi.system.dpi.override" properties allow manually overriding the system setting with a custom value.
  • The "hidpi.system.dpi.override" allows setting a custom DPI from 96 (100% scaling) to 288 (300% scaling).
  • Setting "hidpi=true" is the equivalent of setting "hidpi.system.dpi.override" to a value of 192 (200% scaling).
  • Note that if "hidpi.system.dpi.override" is set, "hidpi" is ignored.
  • Note that these properties are ignored on MacOS, i.e. they are used only on Windows and Linux.
Important - please follow the instruction in the Configuring Android Studio: IDE & VM Options, JDK, etc page when overriding these properties.
    Finally, using these properties is a "last resort" option and most probably hide a defect in the way Android Studio detects the system DPI value, so p
    lease file a bug in "Help > Submit Feedback" with a screenshot and as much information as possible on your system configuration.

    Comments