0
Ich möchte DrawerLayout enthalten Toolbar und meine Inhalte Layout verwenden, aber wenn ich meine Funktion beenden, ist die Wirkung folgen wie folgt: effect1, effect2ich die DrawerLayout verwenden enthalten Toolbar, aber die Toolbar kann nicht angezeigt werden vollständig
das ist mein xml:
<include layout="@layout/layout_toolbar"/>
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_below="@+id/appToolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<!-- The content view -->
<RelativeLayout
android:id="@+id/user_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_background1">
<FrameLayout
android:id="@+id/flay_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
<include layout="@layout/layout_player"/>
</RelativeLayout>
<!-- Your drawer view. This can be any view, LinearLayout
is just an example. As we have set fitSystemWindows=true
this will be displayed under the status bar. -->
<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:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer"/>
</android.support.v4.widget.DrawerLayout>
</RelativeLayout>
und diese:
<?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/appToolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_alignParentTop="true"
android:background="?attr/colorPrimary"
app:subtitleTextColor="?attr/colorAccent"
app:theme="@style/MyToolbar">
<!-- toolbar content -->
</android.support.v7.widget.Toolbar>
Ich weiß nicht, warum die Symbolleiste von der Statusleiste abgedeckt wird, anstatt darunter.
Bereits tun zu ändern, aber nicht funktionieren –
wollen Sie Statusleiste vollständig zu verbergen? –
Nein, ich möchte nur die Symbolleiste vollständig anzeigen. –