Home > database >  android - how to know the density to define for display
android - how to know the density to define for display

Time:03-26

I am trying to create a small android device, I got a lcd display with 360x600 and 3inch. if I use the formulat sqrt(ww hh)/inches, the value is 233. is that the correct density?

I checked some android phone in market but looks like the density define value not calculated from the formula.

e.g. 6.8 inch display with 1080x2340, the value should be 415, but actually the density has been set to 440.

How 440 is calculated from then!

CodePudding user response:

The density isn't defined by a formula. It's a physical property of your screen. It should be in the specs you got from the manufacturer. It's the number of pixels per inch. Its literally the number of pixels in a row within 1 inch of space.

Also, the density reported on a phone. isn't always absolutely correct. They generally round to a nice number, and there's some device to device discrepencies due to the manufacturing process. Some OEMs even purposely bump it by 20% or so because they think apps look nicer when scaled bigger (meaning the physical dpi and logical dpi are not equivalent).

  • Related