如何避免碎片重叠? Android默认导航抽屉

时间:2015-12-19 17:30:23

标签: android android-fragments overlap

MY FRAGMENTS重叠(见截图) 如何避免这个

MainActivity

how to Prevent this ?

片段切换代码:

 else if (id == R.id.nav_improve) {

       Improve improve1 = new Improve();

        getSupportFragmentManager().beginTransaction()
                .replace(R.id.content_frame, improve1).commit();

Content_Main(content_frame布局) .................................................. .........

<FrameLayout 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:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/content_frame"
app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:showIn="@layout/app_bar_main"
tools:context=".MainActivity">

0 个答案:

没有答案