在多窗口模式下,如果应用程序窗口位于第二个位置,状态栏图标的颜色会在 Android 10 Lineage OS 上不时从白色变为黑色(如果您旋转手机)。运行 Android 9 的 Samsung Stock 上没有这样的错误。看起来 android 随机将应用程序的配色方案优先放在第一位。
样式.xml:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>
</resources>
完整的源代码可在https://github.com/alecpetrosky/Android-Immerse-Demo获得