Android的状态栏预计规模25x25dp的图标,而指南推荐32x32dp。谁是谁非?谁是谁非、图标、状态栏、规模

2023-09-12 23:02:32 作者:Eternally 永恒

据Android的图标设计指南(这里,见表1),开发者需要提供状态栏旁边尺寸图标:

According to android icon design guidelines (here, see table #1), developer needs to provide status bar icons of next sizes:

Status Bar  24 x 24 px (LDPI)  32 x 32 px (MDPI)  48 x 48 px (HDPI)

在我的测试表明,状态栏始终有25 DP的高度,预计25x25dp图标。这意味着这些尺寸:

While my measurements show that status bar always has 25 dp in height and expects icons of 25x25dp. This translates to these sizes:

Status Bar  19 x 19 px (LDPI) 25 x 25 px (MDPI)  38 x 38 px (HDPI)

下面是我如何得到那些尺寸:

Here is how I get those size:

25dp * 0.75 = 18.75 => 19px (LDPI)
25dp *  1   = 25    => 25px (MDPI)
25dp *  1.5 = 37.5  => 38px (HDPI)

我已经确认了几款Android手机和仿真器计算出大小。

I have confirmed calculated sizes on several Android phones and on emulators.

现在的问题主要是:为什么准则中使用大小从什么是真正使用状态栏有什么不同?

The question basically is: why guidelines use sizes different from what is really used by status bar?

P.S。事实上,我必须打破因precise像素控制要求的指导方针。而我只是混淆了这种状况。那么为什么这个事情是这样真的会帮我解释。

P.S. I actually need to break guidelines due to precise pixel control requirements. And I just was confused by this state of affairs. So explanation of why this the way it is would really help me.

推荐答案

警告:无论是否不写时,得到的答案是正确的,看来现在不正确。请参见 https://www.google.com/design/spec/style/icons。 HTML ,在目前的指导方针。

Warning: regardless of whether or not the answer was correct when written, it appears not to be correct now. See https://www.google.com/design/spec/style/icons.html for the current guidelines.

它只是似乎是一个错误。 (请注意,由于2010-12-04,他们也已经越过他们​​引用的页面上图4和图5)。

It just seems to be an error. (Note that as of 2010-12-04, they've also crossed their references to figures 4 and 5 on that page.)

由于莱克斯指出,他们有正确的数量进一步下降,在状态栏图标部分。

As Lex points out, they have the correct number further down, in the "Status bar icon" section.

他们还决定各方2像素safeframe为25×25,你的图标的形状必须符合内,但它似乎是好的,有一些走样相关的东西贴出来,但只两侧,这种类型的图标。 (意思是,你真的要瞄准21x21那个大小。)

They also dictate a 2-pixel "safeframe" on all sides at 25x25 which the shape of your icon must fit within, though it seems that it is okay to have some aliasing-related stuff stick out, but only on the sides, for this type of icon. (Meaning that you really want to aim for 21x21 at that size.)