gpt4 book ai didi

android - 为什么 Nexus 6 的密度是 560 dpi?

转载 作者:IT老高 更新时间:2023-10-28 21:47:10 25 4
gpt4 key购买 nike

如何为 Nexus 6 准备资源?如果我将图像放入 xxxhdpi,它们会按比例缩小并降低质量。我将图像放入 xxhdpi,它们会按比例放大并降低质量。如果实际密度 493ppi 更接近 xxhdpi ~480dpi,为什么开发人员决定设置值 560dpi?

The Nexus 6 boasts an impressive 5.96” Quad HD screen display at a resolution of 2560 x 1440 (493 ppi). This translates to ~ 730 x 410 dp (density independent pixels).

Nexus 6 has a quantized density of 560 dpi, which falls in between the xxhdpi and xxxhdpi primary density buckets.

For the Nexus 6, the platform will scale down xxxhdpi assets, but if those aren’t available, then it will scale up xxhdpi assets.

xxhdpi ~480dpi
xxxhdpi ~640dpi

最佳答案

对于 Nexus 6,制造商选择了 560 的量化密度(adb shell getprop ro.sf.lcd_density),尽管物理密度约为 493(getResources().getDisplayMetrics().toString() )。了解他们为什么会这样做需要了解量化密度的含义以及它如何影响图像资源渲染,这将在 here 中进行解释。 .

简而言之,560 的量化密度意味着用于加载/渲染图像的比例因子将是 3.5。用 D. Hackborn 的话来说,“密度……是一个抽象的密度桶,设备制造商认为在其中运行他们的 UI 是有意义的。这是用来评估诸如“dp”单位之类的东西以及从资源中选择和缩放位图的东西。'

关于android - 为什么 Nexus 6 的密度是 560 dpi?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28477572/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com