Android 调用viewpager顶部的片段相互重叠

Android 调用viewpager顶部的片段相互重叠,android,android-layout,android-viewpager,Android,Android Layout,Android Viewpager,我有下面的布局 <?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/coordinat

我有下面的布局

<?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/coordinator_bracket_activity"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

        <include
            android:id="@+id/app_bar_bracket_activity"
            layout="@layout/app_bar" />

            <android.support.design.widget.TabLayout
                android:id="@+id/tabs"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:foregroundTint="@color/colorAccent"
                app:tabMode="fixed"
                app:tabMaxWidth="0dp"
                app:tabGravity="fill"/>

            <mypackage.NonSwipeViewPager
                android:id="@+id/tabs_pager"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"/>
    </LinearLayout>
</android.support.design.widget.CoordinatorLayout>
这是我的clicklistener上的应用程序栏上的按钮


想法?

视图是按照XML中定义的顺序绘制的。如果您希望在另一个视图的顶部显示一个视图,则该视图应显示在另一个视图之后,或者您尝试使用:
视图是按照XML中定义的顺序绘制的。如果您希望在另一个视图的顶部显示一个视图,则该视图应显示在另一个视图之后,或者您尝试使用:

FragmentTransaction ft = mFM.beginTransaction();
                    mCustomFragment = CustomFragment.newInstance(mObject, mListOfObjects());
                    ft.replace(R.id.activity_fragment, mCustomFragment , "CustomFragment");
                    ft.addToBackStack(null);
ft.commit();