Android 分隔符样式不起作用

Android 分隔符样式不起作用,android,android-layout,Android,Android Layout,下面的代码是我正在膨胀到主布局的布局(附在根上): 但是,尽管具有style=“?android:attr/buttonBarStyle”分隔符不显示,并且是透明的。按钮之间有“间隙”,但其颜色是透明的。如果将linearlayout的背景配置为纯色,则该颜色在间隙内可见。现在它的默认背景是@null,如图形布局所示 <!-- This is my layout/event_buttons.xml --> <?xml version="1.0" encoding="utf-8"

下面的代码是我正在膨胀到主布局的布局(附在根上):

但是,尽管具有
style=“?android:attr/buttonBarStyle”
分隔符不显示,并且是透明的。按钮之间有“间隙”,但其颜色是透明的。如果将linearlayout的背景配置为纯色,则该颜色在间隙内可见。现在它的默认背景是
@null
,如图形布局所示

<!-- This is my layout/event_buttons.xml -->
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/eventDisplayButtons"
    style="?android:attr/buttonBarStyle"  // the style
    android:layout_width="fill_parent"
    android:layout_height="50dip"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_gravity="bottom"
    android:divider="?android:attr/dividerHorizontal"  // this is not really necessary 
    android:orientation="horizontal"
    android:weightSum="3" >

    <Button
        android:id="@+id/open_link_button"
        style="?android:attr/buttonBarButtonStyle"  // child style
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="@drawable/btn_white"
        android:drawablePadding="-2dp"
        android:drawableTop="@drawable/ic_menu_link"
        android:paddingTop="3dp"
        android:text="@string/open_link"
        android:textColor="@color/darkGrey"
        android:textSize="@dimen/event_buttons_text_size" />

    //two more buttons here

</LinearLayout>

//这里还有两个按钮
我在想,如果我的风格/主题影响了分隔符,它们会变得透明:

 <style name="MyTheme.TranslucentActionBar" /* the parent of MyTheme is android:Theme.Holo.Light */>
    <item name="android:actionBarStyle">@style/MyTheme.ActionBar.Transparent</item>
    <item name="android:windowActionBarOverlay">true</item>
    <item name="android:windowContentOverlay">@null</item>
 </style>


<style name="MyTheme.ActionBar.Transparent" parent="@android:style/Widget.Holo.Light.ActionBar>
    <item name="android:background">@android:color/transparent</item>
    <item name="android:icon">@android:color/transparent</item>
</style>

@style/mysteme.ActionBar.Transparent
真的
@空的
 <style name="MyTheme.TranslucentActionBar" /* the parent of MyTheme is android:Theme.Holo.Light */>
    <item name="android:actionBarStyle">@style/MyTheme.ActionBar.Transparent</item>
    <item name="android:windowActionBarOverlay">true</item>
    <item name="android:windowContentOverlay">@null</item>
 </style>


<style name="MyTheme.ActionBar.Transparent" parent="@android:style/Widget.Holo.Light.ActionBar>
    <item name="android:background">@android:color/transparent</item>
    <item name="android:icon">@android:color/transparent</item>
</style>