![](http://www.apkbus.com/data/attachment/forum/201512/23/092619hujc145jn11252uk.png)
实现步骤:
1、下载第三方开源库https://github.com/jgilfelt/SystemBarTint(注意事项,V19以上才会出现透明)
2、项目目录res下新建values-v19文件夹,添加style.xml文件,内容如下
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar.TranslucentDecor">
<!-- Customize your theme here. -->
</style>
</resources>
3、Activity中设置状态栏透明,显示根布局的背景图片
|
protected void setSystemTintBar(){
// create our manager instance after the content view is set
tintManager = new SystemBarTintManager(this);
// enable status bar tint
tintManager.setStatusBarTintEnabled(true);
// enable navigation bar tint
tintManager.setNavigationBarTintEnabled(true);
// set a custom tint color for all system bars
tintManager.setStatusBarTintColor(getResources().getColor(R.color.navigation_bar_bg));
}