HDPI vs MDPI vs LDPI emulator

Running Android emulators with the same resolution of 480x800 on different DPI (120, 160, 240), I think that the screen with the highest DPI will have the smallest interface elements (images, buttons, etc.), and the one with the lowest DPI will be of the greatest importance. But the opposite is true. I turned on the screen shot to demonstrate what I mean. Right to left: HDPI emulator, MDPI emulator, LDI emulator

My emulator settings:

HRI:

  • Skin Resolution: 480x800
  • LCD abstract density: 240

MDPI:

  • Skin Resolution: 480x800
  • LCD abstract density: 160

LDPI:

  • Skin Resolution: 480x800
  • LCD abstract density: 120

I started each of the emulators with the following settings:

  • Real scale display
  • Screen size: 5 inches
  • DPI monitoring: 105
  • Scale: 0.56

Am I doing something wrong or is this the expected result? If so, why does he behave this way? If I make the equivalent in Photoshop (viewing for the print option), I get completely opposite and correct results.

+4
source share
2 answers

The problem turns out to be simple math. If we take the formula for calculating DPI as

dpi = sqrt(height^2 + width^2)/(screen size in inches) 

it becomes obvious that you cannot select all three components when starting the emulator - only two, and the android will calculate the missing component.

From my original question above, I indicated a constant resolution (480x800) and a constant screen size (5 inches). But the 480x800 always produces a DPI of about 186 dpi. Thus, making DPI different in each of these cases, the Android emulator got confused, and I think that it dropped my indicated original resolution and computed its own.

+11
source

Expected. Android is increasing the default font size in anticipation of this higher DPI. The goal is for a font to have the same physical size for a certain physical screen size (say, 3 inches), regardless of its resolution. Displays with a higher density have smaller pixels, so when setting up the DPI setting, for a higher Android need, a larger font is required to display the same size relative to the screen.

0
source

All Articles