我有一个问题,使我的状态栏 透明或半透明。我正在使用AppCompat v22主题。我想将windowTranslucentStatus用于 API >=19。我真的在stackoverflow上搜索了答案,但我找不到任何解决我的问题的方法。我认为最简单的方法是向您展示我测试应用程序时使用的智能手机上的代码和屏幕截图。
<RelativeLayout
android:id="@+id/activitylayout"
android:fitsSystemWindows="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
在我的 Activity 布局的代码上方。
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
<item name="drawerArrowStyle">@style/drawerarrowstyle1</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:fitsSystemWindows">true</item>
我的 style.xml(v19) 代码。 问题:我的状态栏有白色背景,在导航抽屉中甚至看不到。