应用栏下 android space

android space under appbar

我试图将两个 Fragments 并排放置,但我无法摆脱 ActionBar 和我的应用程序内容之间的 space :

这是我的 XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="horizontal" android:layout_width="match_parent"
    android:fitsSystemWindows="true"
    android:layout_height="match_parent"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:elevation="0dp"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="com.tce.manager.MainActivity"
    tools:showIn="@layout/app_bar_main">

    <fragment
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:elevation="2dp"
        android:name="com.tce.manager.DeviceListFragment"
        android:layout_weight="3"
        android:id="@+id/fragment_device_list" />

    <FrameLayout
        android:background="@android:color/darker_gray"
        android:elevation="0dp"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="2" />

</LinearLayout>

我已经尝试更改工具栏的 marginspadding 以及 AppBarLayout

删除android:fitsSystemWindows="true"

If it's set to true, then it adjusts the padding of this view to leave space for the system windows.

尝试删除操作栏和片段之间的顶部填充。 Android Studio 有时会添加顶部填充。此外,更改约束,以便 Fragment 正确呈现