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?
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With