10
ナビゲーションドロワーがステータスバー上で半透明に機能しない
私はAndroidプロジェクトに取り組んでおり、NavigationDrawerを実装しています。新しいマテリアルデザイン仕様とマテリアルデザインチェックリストを読んでいます。 仕様では、スライドアウトペインはステータスバーを含む他のすべての上に浮かび、ステータスバーの上に半透明である必要があるとされています。 ナビゲーションパネルはステータスバーの上にありますが、透明度がありません。Google Developersブログスポットの上記のリンクで提案されているように、このSO投稿のコードに従いました。DrawerLayoutを使用してActionBar /ツールバーの上とステータスバーの下に表示するにはどうすればよいですか?。 以下は私の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 android:id="@+id/left_drawer" android:layout_width="match_parent" android:layout_height="match_parent" android:choiceMode="singleChoice"></ListView> </LinearLayout> </android.support.v4.widget.DrawerLayout> 以下は私のアプリのテーマです <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/appPrimaryColour</item> <item name="colorPrimaryDark">@color/appPrimaryColourDark</item> <item name="colorAccent">@color/appPrimaryColour</item> <item name="windowActionBar">false</item> …