您好,我想要去掉工具栏下面的阴影效果。为此,我使用了“elevation”属性。 目前我的代码如下:
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
/>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.design.widget.CoordinatorLayout>
输出结果如下:
我不想要下面的阴影,所以我设置了
app:elevation="0dp"
将AppBarLayout的阴影去掉后,汉堡菜单消失了。
新的输出如下:
![enter image description here](https://istack.dev59.com/I1LW1.webp)
请问有人能告诉我如何在不隐藏/消失汉堡菜单的情况下去掉阴影吗?