ho creato un layout AppBar come questoCoordinatorLayout e AppBarLayout elevazione
<android.support.design.widget.AppBarLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/appbar_layout"
android:layout_height="@dimen/app_bar_height"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:elevation="20dp">
<android.support.design.widget.CollapsingToolbarLayout...>
</android.support.design.widget.AppBarLayout>
funziona e getta un'ombra nella LinearLayout:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/app_bar_large" />
</LinearLayout>
Tuttavia quando ho messo in ombra CoordinatorLayout è gone:
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/app_bar_large" />
</android.support.design.widget.CoordinatorLayout>
Come posso rendere appbar per mostrare nuovamente la sua ombra?
come risolvere questo problema –
http://stackoverflow.com/a/39247130/2158970 – Yuraj
https://stackoverflow.com/a/ 32393698/4542217 –