Android: Appcompat 21 wie man Schatten auf der Aktionsleiste hinzufügt

Ich füge die neue Materialdesign-Aktionsleiste aus dem neuen Anwendungscompat hinzu und verwende das neue Symbolleisten-Widget. Ich habe einen benutzerdefinierten Hintergrund in der Symbolleiste in XML festgelegt, aber mein Problem ist, dass der Schlagschatten aus der Aktionsleiste nicht angezeigt wird. Wissen Sie, wie das geht?

Toolbar code

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/my_awesome_toolbar"
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:minHeight="?attr/actionBarSize"
    android:background="@drawable/ab_background_textured"
    app:theme="@style/MyTheme"
    app:popupTheme="@style/MyTheme.Popup"/>

MyTheme style

<style name="MyTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:textColorPrimary">@color/abc_primary_text_material_dark</item>
    <item name="actionMenuTextColor">@color/abc_primary_text_material_dark</item>
    <item name="android:textColorSecondary">#ffff8800</item>
</style>

MyTheme.Popup style

<style name="MyTheme.Popup" parent="ThemeOverlay.AppCompat.Dark">
    <item name="android:textColor">#ffffff</item>
</style>

Aktualisiere

Wie @Justin Powell schlug vor, dass ich das @ hinzufüactionBarStyle zu meinem thema gibt es aber noch keinen schlagschatten.

MyTheme-Stil (aktualisiert)

<style name="MyTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:textColorPrimary">@color/abc_primary_text_material_dark</item>
    <item name="actionMenuTextColor">@color/abc_primary_text_material_dark</item>
    <item name="android:textColorSecondary">#ffff8800</item>
    <item name="android:actionBarStyle">@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse</item>
</style>

Antworten auf die Frage(4)

Ihre Antwort auf die Frage