laobie / StatusBarUtil

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

How to make lightMode compatible with vivo, gionee phone? #221

Open jhwsx opened 6 years ago

jhwsx commented 6 years ago

I am trying to use StatusBarUtil to get grey words and white background effect in the statusbar. The code I use is:

protected void setStatusBar() {
        int color = getResources().getColor(android.R.color.white);
        StatusBarUtil.setColor(this, color, 0);
        StatusBarUtil.setLightMode(this);
 }

Well, the code is perfect in huawei, xiaomi and meizu phone. But when it comes to vivo, gionee, yunos phone, the effect in the statusbar is white words and white background. In fact, I am only able to see white background in the status bar, which is very bad user experience. I notice that there are some practice to compromise this problem by setting the color as light grey. But I am not sure whether these are the best practice. Can we find a way to become compatible with vivo, gionee and yunos phone perfectly?

yutouxiansheng commented 5 years ago

爬楼#253看到说是 StatusBarUtil.setLightMode(this); int color = getResources().getColor(android.R.color.white); StatusBarUtil.setColor(this, color, 0);