使用MD兼容包NavigationView侧滑导航栏,导致在4.4的机器上不能延展到statusbar

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/main_drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="@bool/fitsSystemWindows">
    <include layout="@layout/activity_main_content" />
    <android.support.design.widget.NavigationView
        android:id="@+id/main_nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        app:headerLayout="@layout/main_drawer_layout_header"
        app:menu="@menu/drawer_view" />
</android.support.v4.widget.DrawerLayout>

阅读 4.2k
1 个回答

是不是主题设置的问题。4.4的加上透明状态栏和导航栏的标记。
还有上面代码@bool/fitsSystemWindows的取值是什么?

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题