0

The following image shows there is a shadow on my toolbar.

How can I remove this shadow and place my menu just under the toolbar?

enter image description here

This is my toolbar code:

<?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" />

this is my Slide-Menu code:

<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"/>

3
  • What shadow are you referring to? Commented Jun 10, 2016 at 12:33
  • I did not understand your question...sory
    – Reza
    Commented Jun 10, 2016 at 12:38
  • Move the Toolbar to the "Slide-Menu code", inside the RelativeLayout XML, but outside the DrawerLayout, and align it to the top, with the DrawerLayout below it.
    – Mike M.
    Commented Jun 10, 2016 at 12:41

1 Answer 1

0

Try this

yourDrawerLayout.setScrimColor(Color.TRANSPARENT);
1
  • I believe the question is asking to put the drawer under the toolbar as well as remove the shadow Commented Jun 10, 2016 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.