2017-10-13 157 views
-4

我很迷茫看到工具栏下方黑条上的导航drawer.I的尝试了很多的方法来删除它。但是,没有什么工作是excepted.You可以看到暗家庭顶部的长方形酒吧。如何删除工具栏下面黑暗栏上的导航抽屉

https://i.stack.imgur.com/A8fAK.png

有谁知道修复this.Please帮我...

appbarlayout是,

<?xml version="1.0" encoding="utf-8"?> 
    <android.support.design.widget.CoordinatorLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    tools:context="com.jrs.medicare.DoctorHome"> 

    <android.support.design.widget.AppBarLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:theme="@style/AppTheme.AppBarOverlay"> 

    <android.support.v7.widget.Toolbar 
    android:id="@+id/toolbar" 
    android:layout_width="match_parent" 
    android:layout_height="?attr/actionBarSize" 
    android:background="?attr/colorPrimary" 
    app:popupTheme="@style/AppTheme.PopupOverlay" /> 

    </android.support.design.widget.AppBarLayout> 

    <include layout="@layout/content_doctor_home" /> 

    <android.support.design.widget.FloatingActionButton 
    android:id="@+id/fab" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_gravity="bottom|end" 
    android:layout_margin="@dimen/fab_margin" 
    app:srcCompat="@android:drawable/ic_dialog_email" /> 

    </android.support.design.widget.CoordinatorLayout> 

acitivity layout is, 

    <?xml version="1.0" encoding="utf-8"?> 
    <android.support.v4.widget.DrawerLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:id="@+id/drawer_layout" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:fitsSystemWindows="true" 
    tools:openDrawer="start"> 

    <include 
    layout="@layout/app_bar_doctor_home" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" /> 

    <android.support.design.widget.NavigationView 
    android:id="@+id/nav_view" 
    android:layout_marginTop="80dp" 
    android:layout_width="wrap_content" 
    android:layout_height="match_parent" 
    android:layout_gravity="start" 
    android:fitsSystemWindows="true" 
    app:menu="@menu/activity_doctor_home_drawer" /> 

    </android.support.v4.widget.DrawerLayout> 
+0

集应用android:layout_marginTop="80dp":海拔= “0dp” –

+0

怎么做呢?它在活动吗? – Suhail

+0

如果使用appbar布局,然后摆在那里或在工具栏 –

回答

0

我想可能我能帮忙, 使用的应用程序:海拔=“0dp “ - 如果您使用支持库(用于支持旧版本的Android) 或使用android:提升 - 如果您未使用支持库。

+0

我在哪里可以做?工具栏? – Suhail

+0

@Suhail分享你的代码 –

+0

检查编辑的问题,请... – Suhail

0

只是删除您NavigationView

这样

<android.support.design.widget.NavigationView 
    android:id="@+id/nav_view" 
    android:layout_width="wrap_content" 
    android:layout_height="match_parent" 
    android:layout_gravity="start" 
    android:fitsSystemWindows="true" 
    app:menu="@menu/activity_doctor_home_drawer" /> 
+0

如果我删除margintop我怎么能实现导航抽屉中picture.if我做到这一点,并发出通知状态bar.I导航抽屉重叠不喜欢它,我想显示导航抽屉像这样没有黑暗bar.How做亲爱的。 ? – Suhail

+0

尝试添加顶部填充的'android:layout_marginTop =“80dp”'该原因的影子别的是你的选择我的朋友 –

+0

Thankz哥们... – Suhail

相关问题