Hallo Ich versuche, meinen Inhalt einfach unter die Symbolleiste zu legen, aber in dem Moment, wenn ich meine Anwendung ausführen, ist ein Teil des Inhalts dahinter versteckt, wenn er darunter liegen sollte.Inhalt unter Symbolleiste anzeigen
Ich habe gelesen, über die Verwendung eines Rahmenlayouts zu versuchen, es zu trennen, aber ich bin ein wenig stecken geblieben. Momentan benutze ich eine einfache Android-Navigationsschachtel, die mit der Software mitgeliefert wird, und ich frage mich, welche Änderungen ich vornehmen muss.
Mein Koordinator Layout
<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>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</android.support.design.widget.CoordinatorLayout>
Meine Schublade Layout
<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_main"
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"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
</android.support.v4.widget.DrawerLayout>
Welche Änderungen muss ich machen?
Bearbeitet, um Layout-Attribute hinzuzufügen, um die Dinge klarer zu machen. – Karakuri
Vielen Dank, sortierte das Problem nicht, wie einfach es war: D – james