Android 4.3 ActionBar shadow not dispaying

The answer I found was HERESimply the solution is a workaround to get and apply the shadow of the actionbar which is missing in android version 4.3. Buggy stuff.

* Set the window content overlay on device's that don't respect the theme
* attribute.
private void setWindowContentOverlayCompat() {
// Get the content view
View contentView = findViewById(;

// Make sure it's a valid instance of a FrameLayout
if (contentView instanceof FrameLayout) {
TypedValue tv = new TypedValue();

// Get the windowContentOverlay value of the current theme
if (getTheme().resolveAttribute(
android.R.attr.windowContentOverlay, tv, true)) {

// If it's a valid resource, set it as the foreground drawable
// for the content view
if (tv.resourceId != 0) {
((FrameLayout) contentView).setForeground(

You may also like...