我无法理解为什么我实现的堆叠式
然后我意识到我需要包含相同的未加前缀属性。
所以我移除了这两个属性并尝试再次运行,但是我仍然看到了选项卡栏的分隔线。
在我的AndroidManifest.xml文件中,我包含了。
任何关于问题可能是什么的建议或想法?
更新
我也尝试了。
但这也没有去除分隔符。是否还有其他属性可以覆盖这些属性?
ActionBar
在最左边的选项卡和屏幕边缘之间有一个间隙。
右侧的选项卡不是这种情况。
我试图通过为ActionBar
设置样式来去除分隔符。经过一番试验,似乎我能够覆盖TabView
样式的属性,但无法覆盖ActionBarSherlock
的TabBar
样式。<style name="ActionBarTabBarStyle.Dark" parent="@style/Widget.Sherlock.ActionBar.TabBar">
<item name="android:divider">@null</item>
<item name="android:showDividers">none</item>
<item name="android:dividerPadding">0dip</item>
</style>
然后我意识到我需要包含相同的未加前缀属性。
Due to limitations in Android's theming system any theme customizations must be declared
in two attributes. The normal android-prefixed attributes apply the theme to the native
action bar and the unprefixed attributes are for the custom implementation. Since both
theming APIs are exactly the same you need only reference your customizations twice rather
than having to implement them twice.
但我尝试包含相同的未添加前缀的属性,但对我来说没有起作用。
我尝试包含相同的未添加前缀的属性。
<style name="ActionBarTabBarStyle.Dark" parent="@style/Widget.Sherlock.ActionBar.TabBar">
<item name="android:divider">@null</item>
<item name="android:showDividers">none</item>
<item name="android:dividerPadding">0dip</item>
<item name="divider">@null</item>
<item name="showDividers">none</item>
<item name="dividerPadding">0dip</item>
</style>
但它会抛出一个错误
Error: No resource found that matches the given name: attr 'dividerPadding'.
Error: No resource found that matches the given name: attr 'showDividers'.
所以我移除了这两个属性并尝试再次运行,但是我仍然看到了选项卡栏的分隔线。
<style name="ActionBarTabBarStyle.Dark" parent="@style/Widget.Sherlock.ActionBar.TabBar">
<item name="android:divider">@null</item>
<item name="android:showDividers">none</item>
<item name="android:dividerPadding">0dip</item>
<item name="divider">@null</item>
</style>
在我的AndroidManifest.xml文件中,我包含了。
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18"/>
任何关于问题可能是什么的建议或想法?
更新
我也尝试了。
<style name="Theme.Dark" parent="@style/Theme.Sherlock.Light.DarkActionBar">
<item name="actionBarDivider">@null</item>
<item name="android:actionBarDivider">@null</item>
</style>
但这也没有去除分隔符。是否还有其他属性可以覆盖这些属性?