【Android】沉浸式状态栏实现

  在Android4.4(API 19)及以后的版本中都增加了对沉浸式状态栏的支持,实现起来也很简单,将application的主题稍作修改即可:

1     <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
2         <item name="android:windowTranslucentNavigation">true</item>
3         <item name="android:windowTranslucentStatus">true</item>
4         <item name="android:windowBackground">@color/colorPrimaryDark</item>
5     </style>
原文地址:https://www.cnblogs.com/laishenghao/p/5329326.html