如何删除导航抽屉上的暗条

时间:2017-12-30 16:40:51

标签: java android navigation-drawer

enter image description here

我使用android studio内置功能创建了一个导航抽屉。之后我从中删除了不需要的东西。但是,我无法从导航抽屉中删除此栏。我尝试了很多方法,包括将海拔更改为0 dp等

如果有人知道确切的问题和解决方案,请快速帮助我....

activity_home

<?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"
tools:openDrawer="start">

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

<android.support.design.widget.NavigationView
    android:id="@+id/nav_view"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    app:elevation="0dp"
    android:layout_marginTop="80dp"
    android:fitsSystemWindows="false"
    app:menu="@menu/activity_user_home_drawer" />
</android.support.v4.widget.DrawerLayout>

app_bar_home

<?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"
android:fitsSystemWindows="true"
tools:context="com.jrs.medicare.userHome">
<android.support.design.widget.AppBarLayout
    android:id="@+id/app_bar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:elevation="0dp"
    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"
        app:elevation="0dp"
        />

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


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


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

content_home

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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/content_user_home"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.jrs.medicare.userHome"
tools:showIn="@layout/app_bar_user_home">


</RelativeLayout>

0 个答案:

没有答案