将编译 sdk 版本从 23 更改为 24 后,Tablayout 被破坏

Tablayout is ruined after changing compile sdk version from 23 to 24

我已经有一个完美运行的应用程序 tablayout.But 在将编译 sdk 版本从 23 更改为 24 后,第二个选项卡中出现了一个小缺口。

它应该是这样的。

但它看起来像这样,有黑色间隙。

谁能告诉我如何解决这个问题

这两个选项卡使用相同的布局。

<?xml version="1.0" encoding="utf-8"?>
<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">

<android.support.design.widget.CoordinatorLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent" android:fitsSystemWindows="true"
    tools:context=".MainActivity">

    <android.support.design.widget.AppBarLayout android:layout_height="wrap_content"
        android:layout_width="match_parent" android:theme="@style/AppTheme.AppBarOverlay">


    </android.support.design.widget.AppBarLayout>

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


</android.support.design.widget.CoordinatorLayout>

<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:itemTextColor="@color/drawer_text_color"
    app:headerLayout="@layout/nav_header_main" app:menu="@menu/activity_main_drawer" />

dashboard.xml

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="10dp">

<ProgressBar
    android:id="@+id/progbar"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:layout_gravity="center"
    />

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    >
   <TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/txt"
      android:text="These are your active court Proceedings"
      android:paddingBottom="10dp"/>
   <android.support.v7.widget.RecyclerView
      android:id="@+id/recycler_view"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="#D9DCDE"
      android:scrollbars="vertical">
   </android.support.v7.widget.RecyclerView>
</LinearLayout>
</FrameLayout>

我希望我的问题是 clear.Please 给我一个解决方案。 谢谢

来自Documentation

android:fitsSystemWindows

Boolean internal attribute to adjust view layout based on system windows such as the status bar. If true, adjusts the padding of this view to leave space for the system windows. Will only take effect if this view is in a non-embedded activity.

所以为 DrawerLayoutCoordinatorLayout

设置 *android:fitsSystemWindows = "false"
    <?xml version="1.0" encoding="utf-8"?>
<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="false"
    tools:openDrawer="start">

    <android.support.design.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="false"
        tools:context=".MainActivity">

    </android.support.design.widget.CoordinatorLayout>
</android.support.v4.widget.DrawerLayout>