我知道怎么样在视图中设置shadowColor,但是在 ActionBarSherlock的标题处,阴影是不显示的。什么原因啊?
这是style.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.SherlockClient" parent="@style/Theme.Sherlock">
<item name="abTitleTextStyle">@style/CustomTitle</item>
</style>
<style name="CustomTitle">
<item name="android:textColor">@color/Turquoise</item>
<item name="android:shadowColor">@color/Green</item>
<item name="android:shadowDx">0</item>
<item name="android:shadowDy">0</item>
<item name="android:shadowRadius">3</item>
<item name="android:padding">5dp</item>
</style>
检查下 manifest中应用程序标记的的自定义样式@style/Theme.SherlockClient
是否代替了@style/Theme.Sherlock
我提供的这个方法只能在ABS 4.X的格式3.2或4的环境下,在project中配置res/layout/abs__action_bar_title_item.xml,然后把程序改为:
<com.actionbarsherlock.internal.widget.ScrollingTextView
android:id="@+id/abs__action_bar_title"
...
android:shadowRadius="1"
... />