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