Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StatusBarUtils Bug #1

Open
hwisprianz opened this issue Oct 29, 2020 · 0 comments
Open

StatusBarUtils Bug #1

hwisprianz opened this issue Oct 29, 2020 · 0 comments

Comments

@hwisprianz
Copy link

If need set statusBar background and foreground at same time. It seems that must set background before set foregound. if didn't do this. Set background always override foregbackground to light-model.
I find code in you lib like this :

wondow.setFlags([flag]);

maybe you need save foreground mode flag before set backgroud flag ,then set foreground mode flag to final flag ,like this :

` int flag = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            int foreDark = activity.getWindow().getDecorView().getSystemUiVisibility() & View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
            //can't set 0
            flag |= foreDark;
        }
        activity.getWindow()
                .getDecorView()
                .setSystemUiVisibility(flag);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant