Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Actionbar logo turns in app icon on an expanded ActionView

I am hitting quite a few obstacles styling the ActionBar.

The problem I am having now is the logo/icon when an ActionView is expanded. For some reason it doesn't use the logo drawable here but the app icon drawable. I want this either gone or set to my own drawable. I tried setting the icon directly in the onMenuItemActionCollapse() using the setIcon() function of ActionBar with no luck. Also tried setting the home and logo stuff in there.

Any ideas how to solve this?

like image 805
Nick Avatar asked Feb 27 '13 09:02

Nick


1 Answers

I found it, although no where documented, when i was going through the source i saw it actually uses the icon instead of the logo. What i also found is that there is an attribute called icon in the actionBarStyle. So the following works:

<style name="action_bar" parent="@android:style/Widget.ActionBar">
    <item name="android:logo">@drawable/logo</item>
    <item name="android:icon">@drawable/logo</item>
</style>
like image 95
Nick Avatar answered Oct 20 '22 09:10

Nick