2
votes

I am developing an application which runs on both honeycomb and ice cream sandwich. I want my action bar not to have the icon but keep the "up/home" button.

I used:

getActionBar().setDisplayOptions(0, ActionBar.DISPLAY_SHOW_HOME);

This removes the action bar icon but keeps the "up" button on ice cream sandwich. But on honeycomb, it removes the "up" button as well.

Is there a way on honeycomb that allows me to keep the "up" button but get rid of the icon?

1

1 Answers

3
votes

This code will remove the menu icon and keep the indicator near it:

<style name="MyTheme" parent="Theme.Sherlock.Light">
    <item name="actionBarStyle">@style/MyActionBarStyle</item>
</style>    

<style name="MyActionBarStyle" parent="Widget.Sherlock.Light.ActionBar">
    <item name="android:icon">@android:color/transparent</item>
    <item name="icon">@android:color/transparent</item>
</style>