相关疑难解决方法(0)

如何在ActionBar(ActionBarSherlock)下关闭蓝线?

我使用ActionBarSherlock主题Theme.Sherlock.ForceOverflow(用于在前蜂窝设备上使用),我需要关闭我的ActionBar下的蓝线....是否可能?

解决方案: 这里

android themes styles actionbarsherlock

16
推荐指数
2
解决办法
1万
查看次数

如何在viewpagerindicator选项卡上更改选项卡背景?

我正在使用Jake Wharton的ViewpagerIndicator库.我将选项卡代码与ActionBarSherlock库结合使用.一切正常,但我试图设置选项卡的背景,无法弄清楚如何.我想要一个带有深色标签和浅色片段(标签内容)的黑暗动作栏.

我使用的基本主题是Theme.Sherlock.Light.DarkActionBar.我通过使其成为设置选项卡属性的样式的父级(如文本颜色,指示器颜色等)来扩展此样式.这会导致暗动作条,光标和光碎片.

我找不到任何会改变标签背景的东西.我可以改变它的唯一方法是将整个应用程序更改为黑暗(使用Theme.Sherlock).到目前为止,这是我的代码:

<style name="vpiTheme" parent="Theme.Sherlock.Light.DarkActionBar">
    <item name="vpiTabPageIndicatorStyle">@style/CustomTabPageIndicator</item>
</style>

<style name="CustomTabPageIndicator" parent="Widget.TabPageIndicator">
    <item name="android:textColor">#FF000000</item>
    <item name="android:paddingTop">6dp</item>
    <item name="android:paddingBottom">6dp</item>
    <item name="android:paddingLeft">16dip</item>
    <item name="android:paddingRight">16dip</item>
    <item name="android:maxLines">2</item>
</style>
Run Code Online (Sandbox Code Playgroud)

tabs android background colors viewpagerindicator

8
推荐指数
2
解决办法
9290
查看次数

ActionBarSherlock堆叠动作栏样式问题

我无法弄清楚为什么ActionBar我实现的堆叠在最左边的标签和屏幕边缘之间有一个间隙.

最左边的标签有左边的分隔符问题

最右边的选项卡不是这种情况.

最右边的选项卡没有分隔符问题

我试图通过造型来移除分隔线ActionBar.在玩了一点风格之后,似乎我能够覆盖TabView样式的属性而不是TabBar样式ActionBarSherlock.

<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>
Run Code Online (Sandbox Code Playgroud)

然后我意识到我需要包含相同的无前缀属性.

ActionBarSherlock主题

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 …
Run Code Online (Sandbox Code Playgroud)

android theming actionbarsherlock android-actionbar android-styles

5
推荐指数
1
解决办法
4875
查看次数