Yeni uygulama tasarımından yeni malzeme tasarımı actionbar'ı ekledim ve yeni araç çubuğu widget'ını kullanıyorum. Xml'de araç çubuğunda özel bir arka plan belirledim ama benim sorunum, actionbardan gelen gölge görünmüyor olmasıdır. Bunun nasıl yapılacağını biliyor musun?Android: Appcompat 21 actionbar'da gölge ekleme nasıl
Çubuğu kodu
<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 tarzı
<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 tarzı
<style name="MyTheme.Popup" parent="ThemeOverlay.AppCompat.Dark">
<item name="android:textColor">#ffffff</item>
</style>
Güncelleştirme
Beğen @Justin Powell, temama actionBarStyle
eklediğimi ancak yine de gölge olmadığını belirtiyor.
Mytheme stili (Güncellendi) öncesi 5.0 düzenleri için
<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>
Olası kopyalar [destek kütüphanesinin İşlem Çubuğu & Araç Çubuğu gölgesini nasıl gösterilir tüm Android sürümleri?] (http://stackoverflow.com/questions/27474766/how-to-sho w-shadow-of-the-actionbartoolbar-of-the-eylem-kütüphane-on-all-an) – rds