Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8380993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:36:04+00:00 2026-06-09T16:36:04+00:00

I am including my styled xml layout: <resources xmlns:android=http://schemas.android.com/apk/res/android> <style name=Theme.Styled parent=Theme.Sherlock> <item name=actionBarStyle>@style/Widget.MyApp.ActionBar</item>

  • 0

I am including my styled xml layout:

<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <style name="Theme.Styled" parent="Theme.Sherlock">
        <item name="actionBarStyle">@style/Widget.MyApp.ActionBar</item>
        <item name="android:actionBarStyle">@style/Widget.MyApp.ActionBar</item>

    </style>

    <style name="Widget.MyApp.ActionBar" parent="Widget.Sherlock.Light.ActionBar">
        <item name="titleTextStyle">@style/Widget.MyApp.TitleTextStyle</item>
        <item name="background">@color/red</item>
        <item name="android:background">@color/red</item>
        <item name="windowContentOverlay">@null</item>
        <item name="android:windowContentOverlay">@null</item>
    </style>

    <style name="Widget.MyApp.TitleTextStyle" parent="TextAppearance.Sherlock.Widget.ActionBar.Title">
        <item name="android:textColor">@color/white</item>
        <item name="android:textSize">21sp</item>
    </style>

</resources>

Some of the search over internet suggests that use windowContentOverlay set to @null. But when i use it in the style xml it doesn’t change anything. Can any one help what to do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:36:05+00:00Added an answer on June 9, 2026 at 4:36 pm

    If you want to create a shadow below the ActionBar you have to set android:windowContentOverlay parameter on the application theme (in your code you are incorrectly setting it on the ActionBar style).

    In your example it would be:

    <style name="Theme.Styled" parent="Theme.Sherlock">
            ...
            <item name="android:windowContentOverlay">@drawable/my_actionbar_shadow</item>
    </style>
    

    Using @null value removes the shadow.

    This one line sets the shadow on ActionBar on Android 3.0 and newer. However if you are using ActionBarSherlock, it will not work as you expect. It would create the shadow on top of the window over the ActionBarSherlock on Android devices running system older than Android 4.0 (although ActionBar is present in the api since Android 3.0, ActionBarSherlock uses custom implementation for all Android versions older than Android 4.0).

    To create the shadow below ActionBarSherlock you have to set windowContentOverlay parameter on the application theme (notice the missing android:).

    <style name="Theme.Styled" parent="Theme.Sherlock">
            ...
            <item name="windowContentOverlay">@drawable/my_actionbar_shadow</item>
    </style>
    

    Again, using @null removes the shadow.

    Although this line works for ActionBarSherlock, it doesn’t work on android devices running Android 4.0 and newer, no shadow is created under the ActionBar on such devices. So how to combine these two parameters to get the desired shadow under both ActionBar and ActionBarSherlock?

    Use resource configuration qualifiers, in your case use platform version qualifiers.
    In res/values/styles.xml use the second xml code. And in res/values-v14/styles.xml use the first xml code. Therefore the ActionBarSherlock version is used by default (for versions pre Android 4.0) and ActionBar version is used for Android 4.0 and newer.

    Edit:
    There is a bug in Android 4.3 (API level 18), android:windowContentOverlay does not work. It should be fixed in future release. In case you need it fixed in Android 4.3, you can find workarounds linked in the bug report.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<manifest xmlns:android=http://schemas.android.com/apk/res/android package=com.app.android android:versionCode=1 android:versionName=1.0 > <uses-sdk android:minSdkVersion=9 android:targetSdkVersion=15 /> <application android:icon=@drawable/ic_launcher android:label=@string/app_name android:theme=@style/Theme.StyledCustom
I've created a WebView-based application according to http://developer.android.com/resources/tutorials/views/hello-webview.html Although I did exactly what was
I am including an (internal) layout in my own layout like this: <include android:id=@+id/twolinelistitem
I have created a default style for a Button including a custom ControlTemplate like
What is the correct/recommended way of including remote CSS style sheet in OpenSocial gadget
How to style from elements unobtrusively in all browsers including IE6
I am creating a table dynamically, and including some preformatted text from an xml
I have these webapplications build in old style HTML, including [framesets] to speed up
I am working on an android game https://code.google.com/p/something-soft/ and I my log cat says
I need to change the android's default Google input method's skin, including the buttons'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.