The Relationship between PPI and Density-factor in android

Viewed 51

According to my basic understanding, if you have a device with higher density(dpi/ppi) you would usually need to use higher density factor (1,1.5,2,3,4) when converting from dp units to px .

The confusion started when I tested this on 2 devices (Galaxy S10+ and Galaxy S20 fe 5g) according to the specification available on the internet the Galaxy S10+ has higher density at 522 ppi compared to the S20 Fe which has 407 ppi . But when calculating the density factor I found out that for S10+ it is 2.62 compared to the S20 fe which was 3.0 (Check attached screenshots from application introspect)

enter image description here

enter image description here

Ref urls for the specifications :

Galaxy S10+ specifications

Galaxy S20 Fe 5G specifications

My Question is : is it normal for a device with less ppi to have higher density factor ?

1 Answers

are you shure that S10+ doesn't have some energy-saving mode with lower density/resolution set on some low-level? S10+ have 3040x 1440 screen (aka QHD/1440p), on your screenshot it have 2280 x 1080 (tall "full HD"/1080p). also app is showing lower horizontal and vertical density (below 400) on S10+ than S20 FE

answering question: no, it isn't normal (lower ppi -> higher density), basing on screen display physical params it won't ever happen, but system may add some programmatic logic and scale down some dimens so app may get different rendering params

Related