2017-10-13 201 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