【问题标题】:customizing the action bar sherlock自定义操作栏 sherlock
【发布时间】:2013-02-07 07:27:13
【问题描述】:

我已经实现了具有如下所示自定义样式的动作条夏洛克

  <resources>
  <style name="MyTheme" parent="Theme.Sherlock">
  <item name= "actionBarStyle">@style/ActionStyle</item>
  <item name="actionBarTabTextStyle">@style/MyTabTextStyle</item>
  <item name="android:actionBarTabTextStyle">@style/MyTabTextStyle</item>
  </style>
  <style name= "ActionStyle" parent="Widget.Sherlock.ActionBar">
   <item name="android:background">#ff000000</item>
   <item name="background">#ff000000</item>
  </style>
 <style name="MyTabTextStyle" parent="Widget.Sherlock.ActionBar.TabText" >
 <item name="android:textColor">#0EBFE9</item>
 <item name = "android:showDividers">none</item>
<item name ="android:textStyle">bold</item>
<item name = "android:divider">#000000</item>

</style>
</resources>

即使将背景设置为黑色,操作栏也会在操作栏和导航选项卡之间显示蓝色分隔线。 我已将显示分隔符指定为无,但导航包含选项卡之间的分隔符。

【问题讨论】:

    标签: android


    【解决方案1】:

    您需要继承父主题TabBar,而不是TabText

    Widget.Sherlock.ActionBar.TabBar
    

    这边:

    <style name="Theme.mActionBarTabBar" parent="Widget.Sherlock.ActionBar.TabBar">
        <item name="android:showDividers">none</item>
    </style>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-12-18
      • 1970-01-01
      • 2013-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多