版权声明:清晨不起早,误一天的事;幼年不勤学,误一生的事。 https://blog.csdn.net/Dr_abandon/article/details/80063800
Android 修改状态栏,让状态栏和布局中view的第一个图片重合
效果图如下:
这个效果完全可以用style来达到效果
下面是根据stysle来改动
在res下新建一个values-v19
新建styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme2" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>
其实里面有用的就只有就只有这句
<item name="android:windowTranslucentStatus">true</item>
然后在设置theme
android:theme="@style/AppTheme2"
就可以了