Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove divider before actionbar menuItem which only have text on it?

I want to remove short divider before ActionBar's MenuItem which has "withText" option in it.

I've tried many different theme setting with it, but failed.

Is there any solution to remove it?

This is my theme xml.

 <style name="my_actionbar" parent="@style/Widget.Sherlock.Light.ActionBar.Solid">
    <item name="android:background">@drawable/actionbar_bg</item>
    <item name="background">@drawable/actionbar_bg</item>
    <item name="android:actionBarDivider">@null</item>
    <item name="actionBarDivider">@null</item>
    <item name="android:showDividers">none</item>
    <item name="android:dividerVertical">@null</item>
    <item name="android:dividerPadding">0dp</item>
    <item name="android:divider">@null</item>
</style>
like image 844
kingori Avatar asked Apr 01 '13 12:04

kingori


1 Answers

The android:actionBarDivider attribute belongs to the theme, not to the action bar style. You can remove the divider like this:

<style name="AppTheme" parent="Theme.Sherlock">
    <item name="actionBarDivider">@null</item>
    <item name="android:actionBarDivider">@null</item>
</style>
like image 89
Matthias Robbers Avatar answered Oct 04 '22 21:10

Matthias Robbers