Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Actionbar Logo size?

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?

like image 807
David Avatar asked Mar 06 '13 13:03

David


People also ask

What is default size of action bar in Android?

actionBarSize will resolve to 0 size on pre-3.0 devices. So when using ActionBarCompat one would stick to android.

What is difference between toolbar and ActionBar?

The Toolbar is basically the advanced successor of the ActionBar. It is much more flexible and customizable in terms of appearance and functionality. Unlike ActionBar, its position is not hardcoded i.e., not at the top of an activity.

What is an ActionBar?

An on-screen toolbar displaying icons that are clicked or tapped to perform various functions. For example, the menu bar at the top of an Android app is called an action bar.


1 Answers

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 x 32 px)
  • drawable-hdpi/ic_logo_wide.png (112 x 48 px)
  • drawable-xhdpi/ic_logo_wide.png (149 x 64 px)

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 (HDPI)
  • 32 dp * 2 = 64 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.

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.

like image 56
Matthias Robbers Avatar answered Sep 25 '22 02:09

Matthias Robbers