Android 在运行时添加子视图会导致它隐藏工具栏

Android 在运行时添加子视图会导致它隐藏工具栏,android,android-coordinatorlayout,Android,Android Coordinatorlayout,我有这个协调器布局: <?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" xmlns:tools="http:/

我有这个
协调器
布局:

<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".ui.activity.MainActivity"
    android:background="#333">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar_layout"
        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>

    <ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">

            <LinearLayout
                android:id="@+id/main_content_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <include
                    layout="@layout/whats_new" />

                <include
                    layout="@layout/discover_movies_button" />

            </LinearLayout>
    </ScrollView>

</android.support.design.widget.CoordinatorLayout>
但是现在,
whats\u new
布局部分隐藏了工具栏。。。我知道这与协调器布局有关,但我不知道如何修复它

final LinearLayout mainContentLayout = (LinearLayout) findViewById(R.id.main_content_layout);
final View whatsNewView = getLayoutInflater().inflate(R.layout.whats_new, mainContentLayout, false);
mainContentLayout.addView(whatsNewView, 0);