动作条标志的大小?标志、大小、动作

2023-09-12 02:01:54 作者:此乃特长

在谷歌I / O 2012 Android应用程序的动作条的标志来代替正常的应用程序图标。在开源项目中,我能找到的是340x72和present只有在这个层面的形象。我搜索如果在动作条使用商标某些指定大小,但我没有发现任何东西。你对此有所了解?

In the Google I/O 2012 Android App an actionbar logo is used instead of the normal app icon. In the open source project I could find the image which is 340x72 and present only in this dimension. I searched if there is some specified size for using a logo in the actionbar, but I did not find anything. Do you know something about this?

推荐答案

我看着YouTube应用程序的资源,因为这似乎是唯一的官方谷歌的应用程序(除了I / O),它使用了操作栏徽标的时刻。

I looked into the resources of the YouTube app, since that seems to be the only official Google app (besides I/O) that uses an action bar logo at the moment.

它包含三个可绘制的标志:

It contains three drawables for the logo:

drawable- MDPI /ic_logo_wide.png(75× 32 PX) drawable- 华电国际 /ic_logo_wide.png(112 x 48 PX) drawable- xhdpi /ic_logo_wide.png(149× 64 PX) drawable-mdpi/ic_logo_wide.png (75 x 32 px) drawable-hdpi/ic_logo_wide.png (112 x 48 px) drawable-xhdpi/ic_logo_wide.png (149 x 64 px)

据从Android的设计指南影像学,这些图像的高度匹配规范的操作栏的图标,这是 32×32 DP 。

According to Iconography from the Android design guidelines, those images' heights match the specification for the action bar icons, which is 32 x 32 dp.

32 DP = 32 PX(MDPI) 在32个DP * 1.5 = 48 PX(华电国际) 在32个DP * 2 = 64 PX(XHDPI) 32 dp = 32 px (MDPI) 32 dp * 1.5 = 48 px (HDPI) 32 dp * 2 = 64 px (XHDPI)

您会发现,在 72 从I / O的应用程序PX(XHDPI)显示不出来。我想,他们只是想增加标志的高度位。

You'll notice that the 72 px (XHDPI) from the I/O app don't show up. I guess, they just wanted to increase the logo's height a bit.

如果一个绘制在XHDPI只提供Android的扩展下来,这比提供的图片,在适当的尺寸少高性能。我想,这只是接受了I / O应用程序的开发者。

If a drawable is only provided in XHDPI, Android scales it down, which is a little less performant than providing the images in the proper sizes. I guess, this was just accepted by the developers of the I/O app.