Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a shadow on ActionBar

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>

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.

Thanks

like image 534
Matroska Avatar asked Apr 13 '26 18:04

Matroska


1 Answers

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 Hi Chris!

like image 91
Dori Avatar answered Apr 16 '26 08:04

Dori



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!