You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find this question too. The question is this util change your theme in this two func. You could change this func in util like this.
`
@TargetApi(Build.VERSION_CODES.M)
public static void setLightMode(Activity activity) {
setMIUIStatusBarDarkIcon(activity, true);
setMeizuStatusBarDarkIcon(activity, true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
int visibility = activity.getWindow().getDecorView().getSystemUiVisibility();
if (visibility != (visibility | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR)) {
visibility = visibility | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
}
activity.getWindow().getDecorView().setSystemUiVisibility(visibility);
}
}
@TargetApi(Build.VERSION_CODES.M)
public static void setDarkMode(Activity activity) {
setMIUIStatusBarDarkIcon(activity, false);
setMeizuStatusBarDarkIcon(activity, false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
int visibility = activity.getWindow().getDecorView().getSystemUiVisibility();
if (visibility == (visibility | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR)) {
visibility = visibility ^ View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
}
activity.getWindow().getDecorView().setSystemUiVisibility(visibility);
}
}`
The text was updated successfully, but these errors were encountered: