Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide ActionBarSherlock title and show only logo

I need to hide title on ActionBarSherlock and show only logo.

When I use actionBar.setDisplayShowTitleEnabled(false); icon also hide.

UPDATE: Thank you guys, but I found a solution. Question maybe closed

in styles.xml:

<style name="FooBar" parent="Theme.Sherlock.Light">
         <item name="android:actionBarStyle">@style/FooBar.ActionBar</item>
         <item name="actionBarStyle">@style/FooBar.ActionBar</item>
    </style>

    <style name="FooBar.ActionBar" parent="Widget.Sherlock.Light.ActionBar">
        <item name="android:displayOptions">showHome|useLogo</item>
        <item name="displayOptions">showHome|useLogo</item>
    </style>

And in AndroidManifest.xml:

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/FooBar"
    android:allowBackup="true">
like image 206
Sever Avatar asked Feb 21 '13 16:02

Sever


1 Answers

Does

actionbar.setTitle("");

work?

like image 181
fweigl Avatar answered Nov 17 '22 01:11

fweigl