9
Navigation Drawer กึ่งโปร่งใสบนแถบสถานะไม่ทำงาน
ฉันกำลังทำโปรเจ็กต์ Android และกำลังใช้งาน Navigation Drawer ฉันกำลังอ่านผ่านใหม่วัสดุการออกแบบ Specและรายการตรวจสอบการออกแบบวัสดุ ข้อมูลจำเพาะระบุว่าบานหน้าต่างเลื่อนออกควรลอยอยู่เหนือสิ่งอื่นใดรวมถึงแถบสถานะและเป็นแบบกึ่งโปร่งใสบนแถบสถานะ แผงการนำทางของฉันอยู่เหนือแถบสถานะ แต่ไม่มีความโปร่งใสใด ๆ ฉันได้ติดตามโค้ดจากโพสต์SOนี้ตามที่แนะนำในบล็อกสปอตนักพัฒนาของ Google ลิงก์ด้านบนฉันจะใช้ DrawerLayout เพื่อแสดงบน ActionBar / Toolbar และภายใต้แถบสถานะได้อย่างไร . ด้านล่างนี้คือเลย์เอาต์ XML ของฉัน <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/my_drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.v7.widget.Toolbar android:id="@+id/my_awesome_toolbar" android:layout_height="wrap_content" android:layout_width="match_parent" android:minHeight="?attr/actionBarSize" android:background="@color/appPrimaryColour" /> </LinearLayout> <LinearLayout android:id="@+id/linearLayout" android:layout_width="304dp" android:layout_height="match_parent" android:layout_gravity="left|start" android:fitsSystemWindows="true" android:background="#ffffff"> <ListView …