Android 将边距添加到navigationDrawer

Android 将边距添加到navigationDrawer,android,Android,这在我身上从未发生过。基本上我有一个导航抽屉布局,当我展示一个片段时,它在所有的侧面都留下了大约10dp的空间,所以它基本上缩小了一点 app_bar_main.xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.andro

这在我身上从未发生过。基本上我有一个导航抽屉布局,当我展示一个片段时,它在所有的侧面都留下了大约10dp的空间,所以它基本上缩小了一点

app_bar_main.xml:

<RelativeLayout 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="com.app.r6s.MainActivity"
android:background="#464646">

<android.support.design.widget.AppBarLayout
    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>

<include
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    layout="@layout/content_main"
    android:layout_alignParentStart="true"
    android:layout_marginTop="55dp" />
<RelativeLayout 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/show_fragments"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.app.r6s.MainActivity"
tools:showIn="@layout/app_bar_main">

那么content_main.xml中的填充物呢<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.TabLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/tab_layout"> </android.support.design.widget.TabLayout> <view android:layout_width="wrap_content" android:layout_height="wrap_content" class="android.support.v4.view.ViewPager" android:id="@+id/viewpager" android:layout_marginTop="48dp"/>
MyFragment fragment = new MyFragment();
        FragmentManager fm = getSupportFragmentManager();
        fm.beginTransaction().replace(R.id.show_fragments, fragment).commit();