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沒有那些界限被轉動,所以人們可以看到這個佈局是如何搞砸的。所有留下的填充不是由我添加的。 –