0
后如此不同我升级我的V7程序兼容性库25.0.0,这导致我的活动突然有这种怪异的填充或保证金左:活动看起来更新程序兼容性库25.0.0
我的活动延伸AppCompatActivity和这里的视图XML的一点点(activity_main.xml中):
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
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"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="300dp"
android:layout_height="match_parent"
android:background="?attr/backgroundColorPrimary"
android:layout_gravity="start"
app:itemBackground="?attr/backgroundColorPrimary"
app:itemIconTint="?attr/foregroundColorPrimary"
android:fitsSystemWindows="false"
app:itemTextColor="?attr/foregroundColorPrimary">
<include layout="@layout/nav_side_bar"/>
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
我试过在CoordinatorLayout
包裹我的整个布局和设置contentInsetLeft
和contentInsetRight
到0dp但仍没有运气......似乎只有我跑API 25(不是XL虽然)像素手机
截图是Emulator还是android设备或布局预览? –
@AmanVerma从一个真实的设备截图。不能在仿真器上复制。 –
@AmanVerma没有那些界限被转动,所以人们可以看到这个布局是如何搞砸的。所有留下的填充不是由我添加的。 –