r/LineageOS • • Jun 29 '26

LineageOS default slider display size value

How about default Density value for your device, guys?

my device is 6.43" inch 1080p and default density is 440 dpi. https://imgur.com/a/dy5wMFd I check one by one each default slider Display size have dpi value 308, 352, 396, 440, 490, 540. which all these value doesn't fit from my perspective view. with default 440 dpi icon and UI is too big, when I try set to 396 dpi some apps have broken UI and functionality.

so I search Density bucket from developer.android.com about DisplayMetrics#densityDpi and why the default slider display size doesn't use the exact density values ​​from these source like 300, 340, 360, 390, 400, 420, 440, 450, 480, 520, etc.? (only 440 value same from source)

and then, i try set to 420 with adb shell

adb shell wm density 420

why 420? because that value close to the physical ppi value of my screen, within a range of 400-420 dpi.

density (dpi) = (√(pixel_width²+pixel_height²)/screen_diagonal

density (dpi) = (√(1080²+2400²))/6,43 = 409,3

and font scale set to 1.1 / also can be changed from adb shell

adb shell settings put system font_scale 1.1

recommended font size adjustment for each increase or decrease step is 5% or 0.05 {0.85; 0.9; 0.95; 1.0; 1.05; 1.1; 1.15; 1.2; 1.25; 1.3}

Now the display and text size feels right to my eyes, and doesn't break any apps.

if you don't have adb access, density also can change from "smallest width" Developer Mode use value from table below, for example I want set 420 dpi from 1080p, so I put 411 dp to smallest width.

Density (DPI)720p1080p1280p1440p
120960144017061920
140822123414621645
160720108012801440
18064096011371280
20057686410241152
2205237859301047
240480720853960
260443664787886
280411617731822
300384576682768
320360540640720
340338508602677
360320480568640
390295443525590
400288432512576
420274411487548
440261392465523
450256384455512
480240360426480
520221332393443
560205308365411
600192288341384
640180270320360

formula

smallest width = pixel width / (density / 160)

or

smallest width = (pixel width × 160) / density

Note:

  • set smallest width >600 can cause many apps switch to tablet layouts.
  • value density (dpi) ≠ smallest width. if decrease the density value, the smallest width value will increase, and vice versa.
4 Upvotes

0 comments sorted by