laobie / StatusBarUtil

A util for setting status bar style on Android App.
http://t.cn/Rq746Kb
Apache License 2.0
8.81k stars 1.72k forks source link

StatusBarUtil#setColorForDrawerLayout not work #236

Closed itning closed 6 years ago

itning commented 6 years ago
StatusBarUtil.setColorForDrawerLayout(activity, drawerLayout, ContextCompat.getColor(activity, R.color.colorAccent), 0);
<color name="colorAccent">#FF4081</color>

这段代码在我 setContentView() 之后且 android:fitsSystemWindows="true" 已经设置 但是状态栏颜色并没有更新

Android 7.1.2 Android 9

itning commented 6 years ago

我查阅这篇文章解决了我的问题 https://blog.csdn.net/JadynAi/article/details/51553624