Ich arbeite an einer Android App und es erfordert DrawerLayout unter der ToolBar. Ich habe das erreicht, aber NavigationView Header, d. H. Status Bar 24dp
ist sichtbar, auch nach dem Entfernen der Kopfzeile. Gibt es eine Möglichkeit, das zu entfernen?Android ausblenden NavigationView Header
XML-Datei:
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<include
layout="@layout/app_bar_home"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<android.support.v4.widget.DrawerLayout
android:layout_marginTop="?android:attr/actionBarSize"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<android.support.design.widget.NavigationView
android:paddingBottom="0dp"
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@null"
app:menu="@menu/activity_home_drawer"/>
</android.support.v4.widget.DrawerLayout>
</RelativeLayout>
Bereits versucht, kein Glück. Übrigens siehst du den oberen grauen Balken in der Schublade. Das ist das Problem. Wie kann ich es durchscheinend machen? – Max
Hatten Sie die Hintergrundfarbe des Header-Layouts auf transparent geändert? –
Wird es einen Unterschied machen? Sogar wir setzen Sichtbarkeit auf Gone? – Max