Android: How to change the ActionBar "Home" Icon to be something other than the app icon?

Phil Ringsmuth picture Phil Ringsmuth · Jun 15, 2011 · Viewed 155.9k times · Source

My application's main icon consists of two parts in one image: a logo and a few letters below it. This works well for the launcher icon for the app, but when the icon appears on the left edge of the ActionBar, the letters get cut off and it doesn't look good.

I would like to provide the ActionBar with a separate version of the icon, with only the "logo" part and not the letters beneath it, but so far have been coming up empty. I honestly can't find any answer to this, and I can't even find the question itself anywhere.

Answer

Joe picture Joe · Jun 15, 2011

The ActionBar will use the android:logo attribute of your manifest, if one is provided. That lets you use separate drawable resources for the icon (Launcher) and the logo (ActionBar, among other things).