0
Verschieben umfasst unter dem relativen Layout
Ich versuche, die include
unter dem Relative-Layout zu verschieben (mit einer Symbolleiste im Innern). Jetzt, wie Sie aus dem Bild sehen können, überlappen sie sich.
Hier ist mein Beispielcode:
<?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"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:fitsSystemWindows="true">
<include layout="@layout/content_main" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
app:layout_collapseMode="pin"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
MarginTop geben, wie Sie Breite der Symbolleiste haben –
wenn ich gebe 'marginTop' in die Symbolleiste dann wird die Symbolleiste positioniert sind, aber ich möchte, dass sie nicht überlappen –
nein nein nicht Rand, sondern Symbolleiste geben die Layout, das Sie einschließen, machen das gleiche –