這是我遇到狀態欄重疊工具欄上的預棒棒糖,但不是棒棒糖/棉花糖
在棒棒糖前期設備我有以下問題
在棒棒糖和問題棉花糖設備一切都顯得精細
我試圖創建打開導航抽屜時顯示半透明狀態欄效果。 在棉花糖和棒棒糖設備上,這工作正常。
這裏是我的代碼
activity_base.xml
<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/drawerLayout"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:theme="@style/ToolbarStyle"
app:theme="@style/ToolbarStyle" />
<FrameLayout
android:id="@+id/activity_content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<include layout="@layout/view_navigation_drawer_layout" />
</android.support.v4.widget.DrawerLayout>
view_navigation_drawer_layout.xml
<android.support.design.widget.NavigationView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/nav_header" />
<ListView
android:id="@+id/lst_menu_items"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
</android.support.design.widget.NavigationView>
請注意,我做,因爲這個問題的答案NavigationView and custom Layout以上
注意兩個佈局有android:fitsSystemWindows="true"
我想,也許它是因爲我有佈局,所以我嘗試複製整個佈局到活動佈局。沒有幫助
我也有我的價值觀-V19目錄這個款式的xml文件(KitKat及以上)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="MaterialDesign">
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>