添加动作条上的阴影阴影、动作

由网友([良辰與良人])分享简介:我想在动作条的标题添加阴影。我试图把属性I am trying to add a shadow under the title of the ActionBar. I have tried putting the attributes@color/whit...

我想在动作条的标题添加阴影。我试图把属性

I am trying to add a shadow under the title of the ActionBar. I have tried putting the attributes

    <item name="android:textColor">@color/white</item>
    <item name="android:shadowRadius">1</item>
    <item name="android:shadowColor">@color/black</item>
    <item name="android:shadowDy">1</item>

不过,虽然文字颜色正,影子是没有的。我使用ActionBarSherlock 3.5,但我认为它不会在本地工作的。

but while textColor is working, the shadow isn't. I am using ActionBarSherlock 3.5 but I think it would not work on native either.

感谢

推荐答案

我不能得到这个工作,无论是在本地或ABS反向移植。使用这里提到的方法 的伟大工程。对于安卓customNavigationLayout 布局你可以柔顺单一的TextView与你的风格应用。这样做了在你的活动/活动基地编程设置标题的缺点。这可以通过从 Activity.getTitle抓住值(做),这是操作栏确实,如果标题设置什么。没有足够的时间寻找到更多!

I can't get this to work either on native or ABS backport. Using the approach mentioned here works great. For the android:customNavigationLayout layout you can just supple a single textView with your style applied. This has the drawback of having to set the title programatically in your activity / base activity. This can be done by grabbing the value from Activity.getTitle(), which is what the action bar does if a title is set. Not enough time to look into further!

PS嗨克里斯!

阅读全文

相关推荐

最新文章