0

下图显示了我的工具栏上有一个阴影。破坏阴影DrawLayout

我该如何删除这个阴影并将我的菜单放在工具栏下?

enter image description here

这是我的工具栏的代码:

<?xml version="1.0" encoding="utf-8"?> 
<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/toolbar" 
android:layout_width="match_parent" 
android:layout_height="?attr/actionBarSize" 
android:background="#2196F3" 
android:layoutDirection="ltr" 
android:textDirection="rtl" 
app:popupTheme="@style/AppTheme.PopupOverlay" /> 

这是我的滑菜单代码:

<RelativeLayout 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
xmlns:android="http://schemas.android.com/apk/res/android"> 



<android.support.v4.widget.DrawerLayout 
android:id="@+id/my_drawerlayout" 
xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:fitsSystemWindows="true"> 

<!-- your content layout --> 
<include layout="@layout/activity_list"/> 

<android.support.design.widget.NavigationView 
    android:layout_marginTop="61dp" 
    android:id="@+id/my_navigation" 
    android:layout_width="250dp" 
    android:layout_height="match_parent" 
    android:layout_gravity="start" 
    android:layoutDirection="ltr" 
    app:headerLayout="@layout/drawer_header" 
    app:menu="@menu/drawer"/> 

+0

你指的是什么影子? –

+0

我不明白你的问题...... sory – Reza

+0

将'Toolbar'移动到'RelativeLayout' XML中的“Slide-Menu代码”中,但在'DrawerLayout'之外,并将它对齐到顶部, DrawerLayout'下面。 –

回答

0

试试这个

yourDrawerLayout.setScrimColor(Color.TRANSPARENT); 
+0

我相信这个问题是要求把抽屉放在工具栏下面,以及去掉阴影 –

+0

我做到了!但不变 – Reza